mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-30 22:34:29 +08:00
80df9053b3
The count command should not treat any flag specially. Not even `-h` and `--help`. It should simply return a count of the number of arguments it received. Fixes #4189
18 lines
250 B
Fish
18 lines
250 B
Fish
# Validate the behavior of the `count` command.
|
|
|
|
echo '# no args'
|
|
count
|
|
|
|
echo '# one args'
|
|
count x
|
|
|
|
echo '# two args'
|
|
count x y
|
|
|
|
echo '# args that look like flags or are otherwise special'
|
|
count -h
|
|
count --help
|
|
count --
|
|
count -- abc
|
|
count def -- abc
|