mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00: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
17 lines
250 B
Fish
17 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
|