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

Mutual exclusion of groups of args #5253

Open
2 tasks done
johnrichardrinehart opened this issue Dec 8, 2023 · 3 comments
Open
2 tasks done

Mutual exclusion of groups of args #5253

johnrichardrinehart opened this issue Dec 8, 2023 · 3 comments
Labels
C-enhancement Category: Raise on the bar on expectations

Comments

@johnrichardrinehart
Copy link

Please complete the following tasks

Clap Version

4.4.8

Describe your use case

I'm building an app which compares two commits on a GitHub repo. I want to support users either passing rev1 and rev2 for comparison or I want them to be able to pass the pr number. So, in terms of clap Usage text I'd have something like

<--rev1 <REV1> --rev2 <REV2> | --pr <PR>>

Describe the solution you'd like

I'd like to be able to combine ArgGroup and required statements in such a way as to accomplish the above.

Alternatives, if applicable

No response

Additional Context

No response

@johnrichardrinehart johnrichardrinehart added the C-enhancement Category: Raise on the bar on expectations label Dec 8, 2023
@epage
Copy link
Member

epage commented Dec 11, 2023

I believe this is a duplicate of #5041. Closing in favor of that. If there is something I missed, let us know!

@epage epage closed this as not planned Won't fix, can't repro, duplicate, stale Dec 11, 2023
@johnrichardrinehart
Copy link
Author

Thanks, @epage . My concern is a bit different than #5041 . My concern is around the generated usage text, not the runtime evaluation of the provided arguments.

@epage epage reopened this Dec 17, 2023
@epage
Copy link
Member

epage commented Dec 17, 2023

Could you add a minimal reproduction case of the situation you are interested in and contrast the existing behavior with the behavior you would want?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Raise on the bar on expectations
Projects
None yet
Development

No branches or pull requests

2 participants