From d8eb7fc46d9ec5aa7d030ead5fab4e05a5b621e7 Mon Sep 17 00:00:00 2001 From: David Adam Date: Mon, 10 Aug 2020 13:37:29 +0800 Subject: [PATCH] fish: support -o short option correctly Closes #7254. --- CHANGELOG.rst | 2 ++ src/fish.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2342940ac..f14b624e6 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -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 diff --git a/src/fish.cpp b/src/fish.cpp index 5b512bea2..81bbda521 100644 --- a/src/fish.cpp +++ b/src/fish.cpp @@ -259,7 +259,7 @@ int run_command_list(parser_t &parser, std::vector *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'},