Files
fish-shell/doc_src/cmds
Isaac Oscar Gariano 4db61ee117 Added argparse support for arguments with multiple optional values.
This commit fixes #8432 by adding put =* in an option spec to indicate that the
option takes an optional value, where subsequent uses of the option accumulate
the value (so the parsing behaviour is like =?, but the _flag_ variables are
appended to like =+). If the option didn't have a value, it appends an empty
string. As an example,. long=* -- --long=1 --long will execute
set -l _flag_long 1 '' (i.e. count $_flag_long is 2), whereas with =? instead,
you'd get set -l _flag_long (i.e. count $_flag_long is 0).

As a use case, I'm aware of git clone which has a
--recurse-submodules=[<pathspec>]: if you use it without a value, it operates on
all submodules, with a value, it operates on the given submodule.

The fish_opt function will generate an =* option spec when given both the
--optional-val and --multiple-vals options (previously, doing so was an error).
fish_opt now also accepts -m as an abbreviation for --multiple-vals, to go with
the pre-existing -o and -r abbreviations for --optional-val and --required-val.
2025-08-30 01:55:56 +10:00
..
2025-02-11 22:51:06 +08:00
2024-09-18 22:11:14 +02:00
2023-06-05 18:26:13 +02:00
2025-05-16 00:30:34 +02:00
2024-04-23 19:36:11 +02:00
2025-03-30 19:42:00 +02:00
2022-03-12 00:21:13 +08:00
2022-03-12 00:21:13 +08:00
2025-04-11 15:11:22 +02:00
2025-04-11 17:29:22 +02:00
2025-03-30 19:42:00 +02:00
2023-01-09 20:33:37 +01:00
2023-02-28 20:49:11 +01:00
2022-10-19 20:10:26 +02:00
2024-06-23 17:45:52 -05:00
2025-06-05 14:10:47 +02:00
2022-03-12 00:21:13 +08:00
2022-03-12 00:21:13 +08:00
2022-03-12 00:21:13 +08:00
2024-09-14 10:29:44 +02:00
2025-03-15 16:36:13 +01:00
2025-05-28 17:09:13 +02:00
2025-01-06 19:40:30 -06:00
2025-01-06 19:40:30 -06:00
2025-05-28 17:09:13 +02:00
2022-03-12 00:21:13 +08:00
2023-01-09 20:33:37 +01:00
2022-09-17 21:31:06 +08:00
2022-03-12 00:21:13 +08:00
2024-09-18 22:11:14 +02:00