Skip to content
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: Add the ability to have a flag without the negate option #23

Open
GoogleCodeExporter opened this issue Jun 26, 2015 · 8 comments

Comments

@GoogleCodeExporter
Copy link

Sometimes it's useful to have a boolean flag that doesn't have a negate option.
For example:
DEFINE_boolean 'force' false 'force overwriting' 'f'

It's not needed to have a --noforce for this option as omitting the flag has 
the same result.

We can add an exclamation mark at the end of the flag name to indicate there is 
no negate option for this flag.
In the above eample the new define statement would be:
DEFINE_boolean 'force!' false 'force overwriting' 'f'

The patch already has this for the build in help flag.
DEFINE_boolean 'help!' false 'show this help' 'h'

Original issue reported on code.google.com by [email protected] on 9 Jan 2013 at 3:24

Attachments:

@petervanderdoes
Copy link
Contributor

See Pull Request #34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants