Skip to content
This repository has been archived by the owner on Jan 1, 2022. It is now read-only.

Help me catch mismatches in number of values and value names #199

Open
2 tasks done
epage opened this issue Dec 6, 2021 · 2 comments
Open
2 tasks done

Help me catch mismatches in number of values and value names #199

epage opened this issue Dec 6, 2021 · 2 comments

Comments

@epage
Copy link
Owner

epage commented Dec 6, 2021

Issue by epage
Saturday Aug 14, 2021 at 01:46 GMT
Originally opened as clap-rs/clap#2695


Please complete the following tasks

  • I have searched the discussions
  • I have searched the existing issues

Clap Version

3.0.0-beta.2

Describe your use case

The two main use cases I have for value names with multiple_values are

  • 1 value name repeated repeated for each value
  • Value name per value

Describe the solution you'd like

To catch mismatches in these, I'd like to have a debug assert so I know when I update one without the other

Alternatives, if applicable

No response

Additional Context

No response

@epage
Copy link
Owner Author

epage commented Dec 6, 2021

Comment by pksunkara
Saturday Aug 14, 2021 at 01:50 GMT


1 value name repeated repeated for each value

That is a case of N:KN where number of values is a multiple of value names. (This is not supported in help message except when N = 1)

@epage
Copy link
Owner Author

epage commented Dec 6, 2021

Comment by epage
Saturday Aug 14, 2021 at 01:55 GMT


Good point about that generalization of the 1:N case. Not sure if it ever shows up but if we have usage support for it, I'm assuming someone requested it at some point.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant