You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Garton, Jamie" <Ja...@adc.com> on 2003/07/09 02:54:27 UTC

org.apache.commons.cli.Option

Hi,
 
I've just started using the org.apache.commons.cli suite. I am trying to
port over an old 
command line perl program which has about 49 different command line switches
and some of those
switches either can take arguments from a set list or user specific values
(Yes very ugly I know).
So I thought this suite would be perfect to manage it all. I am unable to
change the interface as 
many scripts have already been written, so reducing the number of switches
is not an option.  
 
My question is there a way I can create multiple Options with no short
option name, as I will 
run out of letters given the large number of switches, and just use the long
option name.

I hope you can help, thanks

Jamie



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


[cli] Re: org.apache.commons.cli.Option

Posted by John Keyes <jb...@mac.com>.
Hi Jamie,

Yeah you can just use longOption names.  If my memory serves me 
correctly,
you can just call withLongName("name").create() and that should do the
trick.

BTW, if you prefix the subject line in you mail with the project e.g. 
[cli]
it will be dealt with quicker.

-John K

On Wednesday, Jul 9, 2003, at 01:54 Europe/Dublin, Garton, Jamie wrote:

> Hi,
>
> I've just started using the org.apache.commons.cli suite. I am trying 
> to
> port over an old
> command line perl program which has about 49 different command line 
> switches
> and some of those
> switches either can take arguments from a set list or user specific 
> values
> (Yes very ugly I know).
> So I thought this suite would be perfect to manage it all. I am unable 
> to
> change the interface as
> many scripts have already been written, so reducing the number of 
> switches
> is not an option.
>
> My question is there a way I can create multiple Options with no short
> option name, as I will
> run out of letters given the large number of switches, and just use 
> the long
> option name.
>
> I hope you can help, thanks
>
> Jamie
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
- - - - - - - - - - - - - - - - - - - - - - -
Jakarta Commons CLI
http://jakarta.apache.org/commons/cli


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