commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Keyes <j...@mac.com>
Subject Re: [CLI] 2 requests
Date Sat, 07 Sep 2002 16:43:32 GMT
If you just want to submit the diffs of the files I can patch and
commit the changes.

Thanks for the help,
-John K

On Friday, Sep 6, 2002, at 22:47 Etc/GMT, MADDOCKS,PETE 
(HP-Loveland,ex1) wrote:

> Hi John,
>
> Thanks for the information.  I grabbed the latest version of code and 
> was
> able to use both features that you described.  I also found a handful 
> of
> bugs in the process which I have fixed in my copy of the code.  What 
> is the
> best way to proceed in submitting these changes back to Apache?  I'll 
> read
> about becoming a contributing member...
>
> The bugs that I found include:
> 1.  OptionBuilder's reset() method was not resetting "optionalArg" and
> "valueSep".
> 2.  In the Options class getOptions() method - options that were "long 
> only"
> were not being returned.
> 3.  HelpFormatter's render() method did not handle "long only" options
> niceley in formatting.
> 4.  The StringBufferComparator inner class in HelpFormatter should 
> strip the
> option prefix before comparing strings.  (This comes into play with 
> "long
> only" options.)
>
> On Monday I'll try to submit these changes back.
>
>
> Thanks,
> Peter Maddocks
> HP NSS NAS Software Design Engineer
> peter_maddocks@hp.com
>
>
> -----Original Message-----
> From: John Keyes [mailto:jbjk@mac.com]
> Sent: Thursday, September 05, 2002 2:41 AM
> To: Jakarta Commons Developers List
> Subject: Re: [CLI] 2 requests
>
> Hi Pete,
>
> On Thu, 2002-09-05 at 00:14, MADDOCKS,PETE (HP-Loveland,ex1) wrote:
>> Hi,
>>
>> I notice that over the last month or so a lot of rework has been done 
>> to
> the
>> CLI package.  I have 2 changes that I need from the 1.3 release and I
> can't
>> tell from the documentation if these have been addressed:
>>
>> 1. Support Long only options.  The Option constructor now takes a 
>> String
>> rather than a char for the short option specifier.  Does this mean 
>> that if
> I
>> want a long-only option, I can just pass a long String into the short
> option
>> paramater?
>>
>> Example usage:
>> 	vg  [volgroupname] [ options ]
>>
>> 	ARGUMENTS
>> 	volgroupname
>>
>> 	OPTIONS
>> 	--rename newvolgroupname
>>
>>
>   Option rename = OptionBuilder.withLongOpt( "rename" )
>                            .create();
>
> This is logged in bugzilla:
>   http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11457
>
>> 2. I need optional arguments on an option.  The Option Constructor 
>> takes a
>> boolean for whether arguments are required and a boolean for multiple
>> arguments.  What happens if I pass "false" for requires args and 
>> "true"
> for
>> multiple args?
>>
>>
>> Example usage:
>> 	vg  [volgroupname] [ options ]
>>
>> 	ARGUMENTS
>> 	volgroupname
>>
>> 	OPTIONS
>> 	-p,--package [newpackagename]
>> 	  		if a [newpackagename] argument is provided then the
>> VolGroup's package name 			is set to the new value.
>> Otherwise, the current value of the package is
> displayed.
> This is logged in bugzilla:
>   http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11456
>
> Option pkg = OptionBuilder.hasOptionalArg()
>                           .withLongOpt( "package" )
>                           .create( 'p' ) );
>
> Give these a whizz and let me know how you get on.  Check
> out the OptionBuilder API for all this kind of stuff.
>
> Cheers,
> -John K
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:commons-dev-help@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:   
> <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:commons-dev-help@jakarta.apache.org>
>


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


Mime
View raw message