You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Heritier Arnaud <ah...@sopragroup.com> on 2004/01/16 19:43:25 UTC
[CLI] Mixing optional and required options
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
Re: [CLI] Mixing optional and required options
Posted by John Keyes <jb...@mac.com>.
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