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-03-28 20:12:58 +01:00
2025-02-11 22:51:06 +08:00
2024-09-18 22:11:14 +02:00
2022-09-24 10:56:43 +02:00
2025-08-30 01:55:56 +10:00
2025-01-15 11:18:46 +01: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
2022-09-24 10:56:43 +02:00
2022-01-19 22:56:41 +08:00
2022-09-30 18:50:14 +02:00
2022-01-19 22:56:41 +08:00
2024-04-20 13:34:08 +02:00
2024-04-20 15:36:29 +02:00
2024-04-20 13:34:08 +02:00
2025-05-11 12:46:08 +02:00
2025-03-30 19:42:00 +02:00
2022-03-12 00:21:13 +08:00
2022-09-24 10:56:43 +02:00
2022-01-19 22:56:41 +08:00
2022-09-24 10:56:43 +02:00
2022-09-24 10:56:43 +02:00
2024-03-19 16:39:37 +01:00
2024-04-20 13:34:08 +02:00
2022-09-24 10:56:43 +02:00
2022-03-12 00:21:13 +08:00
2022-09-24 10:56:43 +02:00
2022-09-24 10:56:43 +02:00
2024-04-20 13:34:08 +02:00
2022-09-24 10:56:43 +02:00
2024-11-06 18:50:41 +01:00
2022-09-24 10:56:43 +02:00
2022-09-24 10:56:43 +02:00
2024-06-06 16:47:39 +02:00
2022-09-24 10:56:43 +02:00
2025-02-08 12:17:55 +01:00
2024-04-20 15:36:29 +02:00
2022-01-19 22:56:41 +08:00
2023-06-16 16:17:58 +02:00
2024-06-15 12:18:37 -07:00
2022-10-19 20:06:35 +02:00
2025-06-23 18:46:54 +02:00
2024-01-06 15:26:20 +01:00
2022-09-24 10:56:43 +02:00
2025-04-11 15:11:22 +02:00
2022-01-19 22:56:41 +08:00
2024-08-11 14:57:04 +02:00
2025-04-24 16:26:45 +03:00
2025-08-30 01:55:56 +10:00
2025-04-12 12:09:08 +02:00
2025-04-12 12:09:08 +02:00
2024-03-09 12:09:00 +01:00
2022-01-19 22:56:41 +08:00
2022-09-24 10:56:43 +02:00
2025-03-12 14:36:40 +08:00
2022-01-19 22:56:41 +08:00
2022-09-24 10:56:43 +02:00
2023-12-17 17:40:45 +08:00
2025-04-11 17:29:22 +02:00
2022-09-24 10:56:43 +02:00
2024-08-13 17:44:23 +02:00
2024-08-13 17:44:23 +02:00
2025-03-30 19:42:00 +02:00
2023-02-13 09:59:28 -06:00
2023-01-09 20:33:37 +01:00
2025-03-28 20:12:58 +01:00
2023-02-28 20:49:11 +01:00
2022-10-19 20:10:26 +02:00
2024-04-20 13:34:08 +02:00
2024-06-23 17:45:52 -05:00
2022-09-24 10:56:43 +02:00
2024-04-20 13:34:08 +02:00
2022-01-19 22:56:41 +08:00
2022-09-24 10:56:43 +02:00
2025-06-05 14:10:47 +02:00
2022-09-24 10:56:43 +02:00
2022-09-24 10:56:43 +02:00
2024-04-20 13:34:08 +02:00
2022-01-19 22:56:41 +08:00
2022-03-12 00:21:13 +08:00
2025-07-28 19:55:18 -07:00
2022-03-12 00:21:13 +08:00
2022-09-24 10:56:43 +02:00
2024-04-20 13:34:08 +02:00
2022-03-12 00:21:13 +08:00
2025-03-28 20:12:58 +01:00
2024-04-20 13:34:08 +02:00
2022-09-24 10:56:43 +02:00
2025-05-11 22:18:06 +02:00
2024-09-14 10:29:44 +02:00
2025-03-15 16:36:13 +01:00
2025-04-11 17:29:22 +02:00
2022-05-14 10:05:02 +02:00
2024-12-29 13:48:34 -08:00
2020-02-19 17:00:35 -08:00
2025-05-28 17:09:13 +02:00
2022-03-12 22:22:02 +08:00
2022-03-12 22:22:02 +08:00
2025-04-08 17:13:18 +02:00
2023-04-20 22:17:08 +02:00
2025-01-06 19:40:30 -06:00
2024-07-23 11:47:58 +02:00
2025-01-06 19:40:30 -06:00
2020-02-19 17:00:35 -08:00
2025-08-21 00:06:24 +02:00
2022-05-14 10:05:02 +02:00
2024-11-25 17:53:14 +01:00
2020-02-19 17:00:35 -08:00
2022-03-12 22:22:02 +08: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
2025-03-28 20:12:58 +01:00
2024-04-20 13:34:08 +02:00
2024-04-20 13:34:08 +02:00
2022-09-24 10:56:43 +02:00
2024-04-20 13:34:08 +02:00
2022-09-17 21:31:06 +08:00
2024-04-20 13:34:08 +02:00
2022-03-12 00:21:13 +08:00
2024-09-18 22:11:14 +02:00
2022-09-24 10:56:43 +02:00