Skip to content

Using default_missing_value without require_equals. #5519

Answered by epage
lancelui-amzn asked this question in Q&A
Discussion options

You must be logged in to vote

In this situation, there are three properties at play

  • default_missing_value
  • require_equals
  • num_args

require_equals is a recommendation related to num_args, not default_missing_value. See https://docs.rs/clap/latest/clap/struct.Arg.html#method.num_args

For example, in cargo we made the choice that subcommands that use num_args(0..=1) cannot have positional arguments.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lancelui-amzn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants