-
-
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
Doing long-only options is awkward #18
Comments
why do you want long only? just pick some lame short char :) |
Two reasons, one certainly more valid and common than the other:
In the first case (long flags are readable) I would prefer enforcing "You will use the long option because it's readable" at the code level by not exposing any short flags. |
If the hack above (leading with comma, no short flag) stops working suddenly in the future due to your changes, no worries - I'll just label all my current flags starting at -A going through the alphabet, I suppose, so I won't pretend that such a hack is a supported thing just yet ;) |
cool well im sure we can make it optional easily |
I can send you a patch if you don't have time/energy. Lemme know :) |
+1, I would also love long-only options. Use case: |
Best way I found to do long-only options in commander is this hack:
The hack here is leading with a comma, so the Option object properly splits and sees --some-option is a long flag. Without the leading ", " it will see --some-option as the short flag and as the long one - kind of stuck my brain for a minute when I saw it first ;)
Thoughts?
The text was updated successfully, but these errors were encountered: