New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`count` should not accept any flags, not even `-h` #4189

Closed
krader1961 opened this Issue Jul 5, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@krader1961
Contributor

krader1961 commented Jul 5, 2017

I was pondering why prevd and nextd had separate blocks for detecting the --help flag rather than doing so in the main flag parsing loop. Then I realized it's because if you do prevd -h it would do count -h which won't return 1-- it will return the help for the count command. That is surprising to say the least. The count command is special. It should always return the number of arguments handed to it even if those args include -h and --. No arg should be special as far as count is concerned.

@krader1961 krader1961 added this to the fish 2.7.0 milestone Jul 5, 2017

@krader1961 krader1961 self-assigned this Jul 5, 2017

@krader1961 krader1961 closed this in 80df905 Jul 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment