[
https://issues.apache.org/jira/browse/CLI-285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17126043#comment-17126043
]
Alexander Schäl commented on CLI-285:
-------------------------------------
My application can work in two different modes {{migrate}} and {{repair}},
which can be selected via the command line option {{--function}}.
Depending on the selected function, two _different_ groups of mandatory and
optional parameters should be used.
Expressed in the above notation, for example
{noformat}
[--function migrate --source <arg> --target <arg> [--legacy]]|[--function
repair --system <arg> [--startDate <arg>]] {noformat}
The {{parse}} method should recognize wrong usage and the {{printHelp}} method
should visualize these combinations in a reasonable way.
_Please_ reactivate this old issue :D
> Multiple Options in Option Group
> --------------------------------
>
> Key: CLI-285
> URL: https://issues.apache.org/jira/browse/CLI-285
> Project: Commons CLI
> Issue Type: Improvement
> Components: CLI-1.x
> Reporter: Richard Kao
> Priority: Major
>
> Allow the creation of multiple Options with in an OptionGroup so something
> like the following can be created:
> [ -a ] [ [ -b <arg>] [ -c <arg> ] | [ -d <arg> ] | [ -e <arg> ]]
> So these would be valid:
> -b <arg>
> -c <arg>
> -b <arg> -c <arg>
> -d <arg>
> -e <arg>
> The "-d", "-e", and "-b -c" are mutually exclusive
--
This message was sent by Atlassian Jira
(v8.3.4#803005)