You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
I was pondering why
prevd
andnextd
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 doprevd -h
it would docount -h
which won't return1
-- it will return the help for the count command. That is surprising to say the least. Thecount
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 ascount
is concerned.The text was updated successfully, but these errors were encountered: