fish: support -o short option correctly

Closes #7254.
This commit is contained in:
David Adam
2020-08-10 13:37:29 +08:00
parent aaa59d377e
commit d8eb7fc46d
2 changed files with 3 additions and 1 deletions

View File

@@ -259,7 +259,7 @@ int run_command_list(parser_t &parser, std::vector<std::string> *cmds, const io_
/// Parse the argument list, return the index of the first non-flag arguments.
static int fish_parse_opt(int argc, char **argv, fish_cmd_opts_t *opts) {
static const char *const short_opts = "+hPilnvc:C:p:d:f:D:";
static const char *const short_opts = "+hPilnvc:C:p:d:f:D:o:";
static const struct option long_opts[] = {
{"command", required_argument, nullptr, 'c'},
{"init-command", required_argument, nullptr, 'C'},