-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add negation flags to the CLI #3050
Conversation
pub(crate) no_header: bool, | ||
|
||
#[arg(long, overrides_with("no_header"), hide = true)] | ||
pub(crate) header: bool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These ones are a bit weird, because the hidden value is --header
and the visible value (and value in the configuration file) is --no-header
/ no-header = true
. Like, in theory it should be... --no-no-header
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's okay as-is.
a2aa648
to
3a3be1e
Compare
d359ea8
to
986b745
Compare
3a3be1e
to
e139b24
Compare
986b745
to
17b6acb
Compare
d1273f2
to
dc8482c
Compare
17b6acb
to
ba0f96e
Compare
dc8482c
to
2c64b96
Compare
ba0f96e
to
fd76507
Compare
2c64b96
to
c6cb443
Compare
a04df02
to
78691ee
Compare
d70307c
to
ae0671a
Compare
Added negation flags for all commands... |
78691ee
to
d510125
Compare
ae0671a
to
27db499
Compare
27db499
to
a94ac58
Compare
Summary
Now that we can pick up configuration values from persistent files, we need to enable users to disable those values from the CLI. For example, if a user has
emit_index_url = true
in the configuration file, they should be able to do--no-emit-index-url
on the command-line. This PR adds support for such negations, following the same patterns we use in Ruff.