git-like-cli icon indicating copy to clipboard operation
git-like-cli copied to clipboard

Mutually exclusive options

Open grkvlt opened this issue 12 years ago • 1 comments

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;

grkvlt avatar May 15 '12 14:05 grkvlt

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?

dain avatar May 15 '12 17:05 dain