commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Patrick <nhoj.patr...@gmail.com>
Subject Commons Cli Grouping Query
Date Thu, 13 Oct 2016 14:25:09 GMT
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.

cheers,
john

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


Mime
View raw message