commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Keyes <j...@mac.com>
Subject Re: [CLI] Mixing optional and required options
Date Fri, 30 Jan 2004 15:08:33 GMT
Hi Arnaud,

Sorry for the response delay, this one slipped past me :-(

This is not possible in CLI 1.0.  There will be support in
CLI 2 for it.  We will be putting some concerted effort into
the development task over the next month or so.  We will
be able to let people know when to expect the release
shortly.

-John K

On 16 Jan 2004, at 18:43, Heritier Arnaud wrote:

> Hi guys !!
>
> I'm using CLI v 1.0 and have a problem.
>
> In my command line I have some required options.
>
> For example :
>
> command -a aaa -b bbbb
>
> But I want to allow the user to print the help message with the -h 
> flag.
>
> command [-h] -a aaa -b bbbb
>
>
> The problem is if the user type :
>
> command -h
>
> when I use the parser (PosixParser), it throws a 
> MissingOptionException for the other options and I can't know that the 
> user want to print the help message.
>
>
> Have you any ideas to do this ???
>
> How can I know that the user typed an optionnal option when required 
> options are missing ???
>
> Thx
>
> Arnaud.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


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


Mime
View raw message