mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
a4dc2b872b
This implements a `fish_opt` command that provides a way for people to create option specs for the `argparse` command as an alternative to creating such strings by hand. Fixes #4190
19 lines
446 B
Text
19 lines
446 B
Text
# bool, short only
|
|
h
|
|
# bool, short and long
|
|
h/help
|
|
# bool, short and long but the short var cannot be used
|
|
h-help
|
|
# required val, short and long but the short var cannot be used
|
|
h-help=
|
|
# optional val, short and long valid
|
|
h/help=?
|
|
# optional val, short and long but the short var cannot be used
|
|
h-help=?
|
|
# repeated val, short and long valid
|
|
h/help=+
|
|
# repeated val, short and long but short not valid
|
|
h-help=+
|
|
# repeated val, short only
|
|
h=+
|
|
h=+
|