-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed as not planned
Description
I have a use case where I could like to require my command options to be conditionally required, and exclusive. For example, let's say my testing
command has three options:
-x, --one <number>
-y, --two <number>
-z, --three <number>
I'd like to make it where the command either needs -x
provided or both -y
and -z
together. The .conflicts()
support makes it easy to ensure that they aren't used together where they shouldn't be but there doesn't seem to be a way to mark -x
as required when -y
and/or -z
isn't used, nor is there a way to mark it such that both -y
and -z
must be used in combination together when -x
isn't used.
I could craft a way to do this myself, and I've searched the project to see if this has been discussed before, but I can't find anything.
himat