Add support for --no-* versions of boolean flags directly in mflag itself#5764
Add support for --no-* versions of boolean flags directly in mflag itself#5764tianon wants to merge 4 commits intomoby:masterfrom
Conversation
Docker-DCO-1.1-Signed-off-by: Victor Vieux <[email protected]> (github: vieux)
|
Seems reasonable to me. |
|
Kind of like |
There was a problem hiding this comment.
Typo: Don't you mean Use a?
There was a problem hiding this comment.
/me puts on American voice and chants "USA, USA, USA". mmmm, maybe thats just a tad aussie :)
There was a problem hiding this comment.
Heh, this was stolen directly from @vieux, since I've included his PR here to make these changes simpler. Also, he hasn't cleared any of this in theory, let alone practice, so I'm not too keen on doing too much more work on it unless it gets reviewed and general acceptance. :)
|
yes, I was thinking about this way too, small nit: clearly we'd need to tweak the doc output to say that the main thing i care deeply about is the double-negative thing, it bit us and our users so many times in TWiki/Foswiki its scary. As to the PR itself, whats easier to use and get right I can grep for '--interactive' or nope, still no strong feelings either way :) |
|
Will be a breaking change, but thought I should mention it now that these are discussed |
Docker-DCO-1.1-Signed-off-by: Victor Vieux <[email protected]> (github: vieux)
|
@thaJeztah +1. Double negative arguments are very confusing. I vote for 1, since it makes the arguments consistent. |
|
@cyphar Wasn't 100% convinced myself on just note |
…self Docker-DCO-1.1-Signed-off-by: Andrew Page <[email protected]> (github: tianon)
Docker-DCO-1.1-Signed-off-by: Andrew Page <[email protected]> (github: tianon)
|
Thanks for the typo fix @vieux ❤️ (I've rebased to include it) Other reviewers - please see @vieux's original in #5760 before getting too deep in this one. The real meat here is specifically in 24beb29 (and then a3f1a2d is just removing the hacks to explicitly add |
|
-1 |
|
Lets not do this and blow up the cli with a bunch of flags for some opposite case. |
|
Fair enough. :P |
So, this is building upon #5760 just to better illustrate what I was trying to describe in #5545.
I don't necessarily expect it to be merged, but figured it wouldn't hurt to actually implement it just to show exactly what it is that I mean.
Basically, for boolean flags, this deprecates the
--flag=true|falsesyntax (while still supporting it, but only for non---no-*versions to keep it simple and easy).Here's some example output:
Again, this mostly just here to clarify my thoughts, so I won't be sad if it doesn't get reviewed and tweaked if it's unpopular. :)