commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Heritier Arnaud" <aherit...@sopragroup.com>
Subject [CLI] Mixing optional and required options
Date Fri, 16 Jan 2004 18:43:25 GMT
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


Mime
View raw message