-
-
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
Implement allowNegateOption. #1355
Conversation
Some initial comments. I am not sure about this. An implicit negate for a single option is interesting, but overlaps with the current implementation. The original implementation assumed there would be just one of positive or negative option, but #795 added the ability to have both work together. Turning on implicit negate options for a whole command is quite intrusive. Every option will have to cope with the option value potentially being The implicit negate should probably appear in the help description. |
Took your addOption from #1331. |
Somewhat related issues:
|
There are two separate ideas in the description and original code for this PR:
Both are interesting, but I would like more interest and use cases from the community before adding either. At the moment the use case is to match a specific existing implementation. The single option support for The code changes in There are major changes to the options code coming in Commander v7 and the changes have now landed on the |
Pull Request
Fixes #1343
Problem
--no-
automatically.Solution
--no-foo
to--foo
with false value if no--no-foo
option was found.ChangeLog