Revert "Remove print_hints from builtin_missing_argument and builtin_unknown_option"

Unfortunately print_hints was true *by default* - so for all builtins
that didn't pass it it would now be false instead.

This resulted in the trailer missing, which includes the line number
and context. So if you ran a script that includes `bind -M` the error
message would now just be "bind: -M: option requires an argument",
with no indication as to where.

This reverts commit 8a50d47a46.
This commit is contained in:
Fabian Boehm
2022-12-22 17:23:42 +01:00
parent 6608ddc95b
commit 3005adebd5
37 changed files with 110 additions and 86 deletions

View File

@@ -65,3 +65,11 @@ $fish -c 'echo {$,}'
# CHECKERR: fish: Expected a variable name after this $.
# CHECKERR: echo {$,}
# CHECKERR: ^
echo "bind -M" | $fish
# CHECKERR: bind: -M: option requires an argument
# CHECKERR: Standard input (line 1):
# CHECKERR: bind -M
# CHECKERR: ^
# CHECKERR: (Type \'help bind\' for related documentation)