From ddcb1813a78643315c5490d8f385d1dbf68cf1b4 Mon Sep 17 00:00:00 2001 From: Isaac Oscar Gariano Date: Mon, 18 Aug 2025 08:14:54 +1000 Subject: [PATCH] Clarified & fixed documentation for fish_opt options. The previous fish_opt synopsis was hard to parse, and was incorrect: - it indicated that -s is optional - it indicated that only one option could be provided - it indicated that every option took a value --- doc_src/cmds/fish_opt.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc_src/cmds/fish_opt.rst b/doc_src/cmds/fish_opt.rst index 685b8ccd2..d83589bea 100644 --- a/doc_src/cmds/fish_opt.rst +++ b/doc_src/cmds/fish_opt.rst @@ -8,7 +8,7 @@ Synopsis .. synopsis:: - fish_opt [(-slor | --multiple-vals=) OPTNAME] + fish_opt -s ALPHANUM [-l LONG-NAME] [-or] [--multiple-vals] [--long-only] fish_opt --help Description @@ -18,10 +18,10 @@ This command provides a way to produce option specifications suitable for use wi The following ``argparse`` options are available: -**-s** or **--short** +**-s** or **--short** *ALPHANUM* Takes a single letter that is used as the short flag in the option being defined. This option is mandatory. -**-l** or **--long** +**-l** or **--long** *LONG-NAME* Takes a string that is used as the long flag in the option being defined. This option is optional and has no default. If no long flag is defined then only the short flag will be allowed when parsing arguments using the option specification. **--long-only**