-
-
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
Enhancement: Handle syntax --[no-]cheese #2213
Comments
Not sure quite what you have in mind. Would you see one option or two in the help? For some historical background, the original support for a negated option (e.g. Support was added in #795 to allow a yes/no pair of options to work nicely together, and extended in in #987 and #1652 for defaults and presets. Now that we have a solid implementation, I am reluctant to add support for a single-option supporting both yes/no as an alternative way of implementing the same behaviour (#1355) without some compelling need or a lot of up-votes. If you were thinking of an author shortcut for creating the pair of options with a single call, I think you could implement that with an override to |
I noticed git uses this syntax in the synopsis for some of its boolean options, as well as other forms for options with an option-value:
|
An answer was provided, and no further activity in a few months. Closing this as resolved. Feel free to open a new issue if it comes up again, with new information and renewed interest. |
Hello,
I hope you're doing well! I just wanted to say that your library is fantastic. While working with it, I discovered that to create flags for both yes and no, I need to declare each one separately.
I was wondering if you might consider an enhancement to the syntax, such as using [no-], to automatically generate both commands with true/false values. 😃
I'd be happy to contribute by submitting a PR for this feature if you're interested.
Have a great day!
The text was updated successfully, but these errors were encountered: