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
This commit is contained in:
Isaac Oscar Gariano
2025-08-18 08:14:54 +10:00
parent e62abc460d
commit ddcb1813a7

View File

@@ -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**