[ http://issues.apache.org/jira/browse/CLI-117?page=all ]

Henri Yandell updated CLI-117:
------------------------------

    Fix Version: 2.1

> Improve the group option desing (ids, more than one instance, etc)
> ------------------------------------------------------------------
>
>          Key: CLI-117
>          URL: http://issues.apache.org/jira/browse/CLI-117
>      Project: Commons CLI
>         Type: Improvement

>     Versions: Nightly Builds
>     Reporter: David Leal
>      Fix For: 2.1

>
> I am ussing the group option and on my humble opionion it should be improved, 
> for example: 
> 1) API doesn't support for the moment a group of options like this:
> - people
>   -id|size|age
> but for more than one instance of the group, for example:
> - people -id id1 -size 1 -age 10 -people -id id2 size 2 age 20
> so, the group option are the same for each people, but with id argument you 
> can identify each element of the group. 
> 2) There is no way to unique identify a option in a given group, for example: 
> Now the following syntax is not possible:
> -id <name> 
> - people
>   -id|size|age
> so, the general option name is id, and the group option is also id. When 
> using the CommandLine.hasOption("-id"), there is no way to distinguish if it 
> is a group option or just a general option. On my opinion, the group option 
> should be checked if there are present using the root group option as prefix, 
> for example something like this: CommandLine.hasOption("-people|-id"), so we 
> are clearly looking for the group option -id from people and with: 
> CommandLine.hasOption("-id") we look for general -id option.
> 3) There is no clear the use of GroupBuilder.withMaximum() and 
> GroupBulder.withMinimum(), I expected to allow more than one group option on 
> the command line, like I have commented on 1), but it doesn't work and the 
> API doesn't allow to distinguish each group instances.
> Thanks in advance,
> David

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to