mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-07-02 00:51:15 -03:00
more wgetopt_long() normalization
This commit is contained in:
@@ -210,7 +210,7 @@ int builtin_commandline(parser_t &parser, io_streams_t &streams, wchar_t **argv)
|
||||
return STATUS_CMD_ERROR;
|
||||
}
|
||||
|
||||
static const wchar_t *short_options = L"abijpctwforhI:CLSsP";
|
||||
static const wchar_t *short_options = L":abijpctwforhI:CLSsP";
|
||||
static const struct woption long_options[] = {{L"append", no_argument, NULL, 'a'},
|
||||
{L"insert", no_argument, NULL, 'i'},
|
||||
{L"replace", no_argument, NULL, 'r'},
|
||||
@@ -303,6 +303,10 @@ int builtin_commandline(parser_t &parser, io_streams_t &streams, wchar_t **argv)
|
||||
builtin_print_help(parser, streams, cmd, streams.out);
|
||||
return STATUS_CMD_OK;
|
||||
}
|
||||
case ':': {
|
||||
streams.err.append_format(BUILTIN_ERR_MISSING, cmd, argv[w.woptind - 1]);
|
||||
return STATUS_INVALID_ARGS;
|
||||
}
|
||||
case L'?': {
|
||||
builtin_unknown_option(parser, streams, cmd, argv[w.woptind - 1]);
|
||||
return STATUS_INVALID_ARGS;
|
||||
|
||||
Reference in New Issue
Block a user