mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-01 13:01:21 -03:00
commandline: Don't complain if insert mode has nothing to insert
That's just, like, a normal thing to happen. We can return false, but it's not an error worth complaining about. See #6931.
This commit is contained in:
@@ -340,11 +340,8 @@ int builtin_commandline(parser_t &parser, io_streams_t &streams, wchar_t **argv)
|
||||
}
|
||||
|
||||
if (append_mode && !(argc - w.woptind)) {
|
||||
streams.err.append_format(
|
||||
BUILTIN_ERR_COMBO2, cmd,
|
||||
L"insertion mode switches can not be used when not in insertion mode");
|
||||
builtin_print_error_trailer(parser, streams.err, cmd);
|
||||
return STATUS_INVALID_ARGS;
|
||||
// No tokens in insert mode just means we do nothing.
|
||||
return STATUS_CMD_ERROR;
|
||||
}
|
||||
|
||||
// Set default modes.
|
||||
|
||||
Reference in New Issue
Block a user