Skip to content

Enhancement: Add the ability to have a flag without the negate option #23

@GoogleCodeExporter

Description

@GoogleCodeExporter
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:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions