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

@ -40,6 +40,8 @@ Notable improvements and fixes
dmesg -w | string replace foo bar
- A number of new debugging categories have been added, including ``config``, ``path``, ``reader`` and ``screen`` (#6511). See the output of ``fish --print-debug-categories`` for the full list.
- The ``-o`` short option to fish, for ``--debug-output``, works correctly instead of producing an
invalid option error (#7254).
- ``set`` and backgrounded jobs no longer overwrite ``$pipestatus``.
Syntax changes and new commands

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'},