mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-19 19:22:45 +08:00
Correct error on when complete -C is used without argument
The new --escape option means that -C is not necessarily the last option; We have this scenario where we produce a bogus error $ fish -c 'complete -C --escape' complete: --escape: option requires an argument --escape doesn't take arguments, so let the error message say -C.
This commit is contained in:
parent
9e0f74eb6c
commit
210e7a9cc9
|
@ -357,7 +357,7 @@ maybe_t<int> builtin_complete(parser_t &parser, io_streams_t &streams, const wch
|
|||
if (!state.initialized) {
|
||||
// This corresponds to using 'complete -C' in non-interactive mode.
|
||||
// See #2361 .
|
||||
builtin_missing_argument(parser, streams, cmd, argv[w.woptind - 1]);
|
||||
builtin_missing_argument(parser, streams, cmd, L"-C");
|
||||
return STATUS_INVALID_ARGS;
|
||||
}
|
||||
do_complete_param = std::move(state.text);
|
||||
|
|
Loading…
Reference in New Issue
Block a user