-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Short option name with single character or multiple characters have different result #2211
Comments
The simple answer is short options should be a single character. This is not currently treated as an immediate error, but may be in the future. From the README:
And listed as explicitly deprecated:
|
(Thanks for the clear description.) |
No, an option with a required option argument looks for a value with or without a space. So these are equivalent: util -a AAA
util -aAAA This is a widely supported syntax, although I do consider it an advanced syntax. When you don't know about it, the lack of an error for an unlucky typo can be surprising. |
Thank you for the detailed explanation |
Closing in favour of #2235, adding an error for short flag longer than one character |
FYI, there is a recent issue asking to allow multiple character short options in Commander 13: #2307 |
Steps to reproduce:
Run the command with the option argument but with no space after the argument name (e.g commandname -asdf).
Run the command with the option argument but with no space after the argument name (e.g commandname -bcd).
Actual result:
Can short option with single character report the same error like issue 2?
The text was updated successfully, but these errors were encountered: