You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Emmanuel Bourg <eb...@apache.org> on 2011/12/15 12:20:38 UTC

Re: [cli] grouping required options

Hi Thomas,

I'm not sure to understand your example. Your command line must either 
have o1+o2+o3 or o4+o5, right ?

Regarding --help, the solution is to have two command line definitions 
and parsing the arguments twice: first to detect the help option, then 
for all the arguments supported.

Emmanuel Bourg


Le 29/11/2011 17:18, Papendieck, Thomas a écrit :
> Hello,
>
> my program has a sequence of required options ( o1, o2, o3) and alternative sequence (o4, o5) .
>
> I understand that I could put o1 and o4 in the same Option Group as well as o2 and o5 .
>
> But how do I tell CLI when to complain for missing o3?
>
> And in addition:
> how do I tell cli not to check for any other option if "help" is passed?
>
> bye
> Thomas
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>



AW: [cli] grouping required options

Posted by "Papendieck, Thomas" <Th...@opitz-consulting.com>.
Hello Emmanuel,

Thanks for your answer.

> Your command line must either
> have o1+o2+o3 or o4+o5, right ?
Yes.

> Regarding --help, the solution is to have two command line definitions
> and parsing the arguments twice: first to detect the help option, then
> for all the arguments supported.
ok, I see.

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