git-like-cli
git-like-cli copied to clipboard
Mutually exclusive options
It would be nice to support mutually exlusive option groups for a command. I am not sure what the best syntax would be - something like this, maybe:
@Option(name = "-a", group = "mutex")
String a;
@Option(name = "-b", group = "mutex")
String b;
I was thinking this kind of thing would be handled by the validation system. Basically, I see the CLI as the syntax parser and the validation system handeling the higher level semantics of the command. Based on the other CLI frameworks in Java, I'm very concerned about making the CLI system overly complex. Does that work for you?