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

fix(parser): Rely on default_missing_value for flag actions #4000

Merged
merged 2 commits into from Jul 28, 2022

Conversation

epage
Copy link
Member

@epage epage commented Jul 28, 2022

In the short term, this just provides a back door to custom actions.
Longer term, we can explore a SetConst action that relies on this
behavior. Really, SetTrue and SetFalse are shortcuts for such an
action but shortcuts can be helpful for usability.

Apparently, this also reduced .text size by 1k

Multiple values can only happen from env variables when configured by
the user, so let's not go out of our way to deal with it.
In the short term, this just provides a back door to custom actions.
Longer term, we can explore a `SetConst` action that relies on this
behavior.  Really, `SetTrue` and `SetFalse` are shortcuts for such an
action but shortcuts can be helpful for usability.

Apparently, this also reduced `.text` size by 1k
@epage epage merged commit 81faa8b into clap-rs:master Jul 28, 2022
@epage epage deleted the missing branch July 28, 2022 20:56
epage added a commit to epage/clap that referenced this pull request Aug 19, 2022
Not sure if we could have originally made this work but it definitely
does now that we use `default_missing_value` for this (clap-rs#4000)
Calder-Ty pushed a commit to Calder-Ty/clap that referenced this pull request Aug 24, 2022
Not sure if we could have originally made this work but it definitely
does now that we use `default_missing_value` for this (clap-rs#4000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant