commandline icon indicating copy to clipboard operation
commandline copied to clipboard

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

Open crmckenzie opened this issue 11 years ago • 5 comments

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

crmckenzie avatar Jan 14 '14 18:01 crmckenzie

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"

nemec avatar Jan 14 '14 19:01 nemec

I created a pull request for this. PR #133

igitur avatar Sep 08 '14 10:09 igitur

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".

Kimi-Arthur avatar Jun 16 '15 06:06 Kimi-Arthur

@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. :)

alexanderfast avatar Jun 21 '15 08:06 alexanderfast

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.

n074v41l4bl34u avatar Feb 16 '17 20:02 n074v41l4bl34u