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

Can't disable a boolean argument with a default value of True #115

Open
crmckenzie opened this issue Jan 14, 2014 · 5 comments
Open

Can't disable a boolean argument with a default value of True #115

crmckenzie opened this issue Jan 14, 2014 · 5 comments

Comments

@crmckenzie
Copy link

-c false should turn off the switch for -c.

@nemec
Copy link
Collaborator

nemec commented Jan 14, 2014

public bool MyValue { get { return _myValue; } set { _myValue = !value; } }

Just kidding.

That's actually a really good idea and it lets the boolean value be scripted: MyApplication.exe -c "$myBool"

@igitur
Copy link

igitur commented Sep 8, 2014

I created a pull request for this. PR #133

@Kimi-Arthur
Copy link

Here is a solution I think is good.
For long option, provide a 'no' option to negate it.
Like "--dryrun" can be negated with "--nodryrun".

@alexanderfast
Copy link
Collaborator

@igitur, as you can see in the issue history your PR is listerd here since you referenced this issue number in it, GitHub does this automatically. :)

@gsscoder gsscoder changed the title Can't disable a boolean argment with a default value of True Can't disable a boolean argument with a default value of True Jul 25, 2015
@n074v41l4bl34u
Copy link

To me it seems more like a bug then an enhancement. Either way it is a small thing and already fixed in other branches so implementing it might be an easy win for the project.

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

7 participants