commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Bourg <ebo...@apache.org>
Subject Re: [cli] grouping required options
Date Thu, 15 Dec 2011 11:20:38 GMT
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
>



Mime
View raw message