I'm having some issues working out if commons-cli out of the box can
handle my use case or if I'll need to handle it myself.

simply program, with a feature which at startup randomly decides if
it's enabled this execution. The feature can be specifically disabled
or enabled, but if enabled using the -yes switch, it has and optional
argument yesOptionalValue. If -yes is present then either -alpha or
-bravo is required but not both.

$ program [ -help | [ -no | [ -yes <yesOptionalValue> | [ -alpha
<alphaRequiredValue> | -bravo ] ] ] ]

hope that is understandable.

if think what I'm trying to achieve is beyond commons-cli.

e.g. full list of valid command lines
$ program -help
$ program -no
$ program -yes -alpha alphaValue
$ program -yes -bravo
$ program -yes optionalValue -alpha alphaValue
$ program -yes optionalValue -bravo

others combination are invalid.


To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org

Reply via email to