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] RESEND: Inconsistency in Options.hasOption(String)
Date Tue, 18 Feb 2003 15:34:07 GMT
Hi Ringo,

I have a new design of CLI nearly implemented.  I currently 
require the '-' or '--' to be prefixed to the option name or
longName respectively.

I am going to investigate whether it will be possible to
avoid the use of the hyphen in any situation i.e. no
matter if you use it to refer to a long or short option.
This might require a caveat like, a short option and a
long option cannot have the same name e.g.

Option c = OptionBuilder.create( "c", "create" );
Option create = OptionBuilder.create( "create", "createArchive" );

so the following call would be ambiguous:

cmdline.getValue( "create" );

should this return the value for Option 'c' or Option 'create'??

Anyway, I have this marked as a todo so I will be looking at
it.  I hope to have the new impl ready for testing and review
in the next few days (don't hold me to that ;).

-John K

On Tue, 2003-02-18 at 14:39, DeSmet_Ringo@emc.com wrote:
> John,
> 
> > The behaviour you describe is incorrect.  I have this on my todo
> > list (sorry for not responding to your first mail).
> 
> Is the expected behaviour the one where both character and string option
> name can be passed in without single or double colon? Would it be OK to
> provide overloaded methods, one with a character argument and one with a
> string argument? What about backward compatibility then?
> 
> If I find some time, I'll try to submit a patch.
> 
> Ringo
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
-- 
John Keyes <jbjk@mac.com>


Mime
View raw message