mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 11:21:15 -03:00
implement -nnn style flags in argparse
This implements support for numeric flags without an associated short or long flag name. This pattern is used by many commands. For example `head -3 /a/file` to emit the first three lines of the file. Fixes #4214
This commit is contained in:
@@ -5,7 +5,7 @@ string match: ^
|
||||
|
||||
# string invalidarg
|
||||
string: Subcommand 'invalidarg' is not valid
|
||||
Standard input (line 258):
|
||||
Standard input (line 251):
|
||||
string invalidarg; and echo "unexpected exit 0" >&2
|
||||
^
|
||||
|
||||
@@ -29,6 +29,6 @@ string repeat: Expected argument
|
||||
|
||||
# string repeat -l fakearg 2>&1
|
||||
string repeat: Unknown option '-l'
|
||||
Standard input (line 359):
|
||||
Standard input (line 352):
|
||||
string repeat -l fakearg
|
||||
^
|
||||
|
||||
Reference in New Issue
Block a user