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: Make arg!(--flag <value>) optional by default #4207

Merged
merged 1 commit into from Sep 13, 2022
Merged

Conversation

epage
Copy link
Member

@epage epage commented Sep 12, 2022

This was ported over from the usage parser which modeled after docopt. We just never got around to implementing the rest of the syntax.

However, when considering this as a standalone feature, an arg!(--flag <value>), outside of other context, should be optional. This is how the help would display it.

Fixes #4206

This was ported over from the usage parser which modeled after docopt.
We just never got around to implementing the rest of the syntax.

However, when considering this as a standalone feature, an
`arg!(--flag <value>)`, outside of other context, should be optional.
This is how the help would display it.

Fixes clap-rs#4206
@epage epage merged commit 1466cd5 into clap-rs:master Sep 13, 2022
@epage epage deleted the arg branch September 13, 2022 00:48
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.

Set required(false) by default for all arguments
1 participant