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!: Simplify min_values/max_values into number_of_values (per occurrence) #4001

merged 11 commits into from Jul 29, 2022


Copy link

@epage epage commented Jul 29, 2022


  • min_values / max_values are across all occurrences
    • This prevents proper --flag [value] behavior with multiple occurrences
  • number_of_values is sort of per occurrence on average
  • it is confusing how these interact with multiple_values and takes_value

This is a major steps towards simplifying all of that (#2688) by creating number_of_values(range).

  • It is always per occurrence
  • Reduces the number of user-visible settings involved, reducing confusion on interactions
  • Displaying of args can more easily take all of the settings into account

Still remaining is to look into dropping multiple_values and takes_value in favor of this.

@epage epage merged commit ddef1cb into clap-rs:master Jul 29, 2022
19 of 20 checks passed
@epage epage deleted the num_vals branch July 29, 2022 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

1 participant