commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <bay...@generationjava.com>
Subject Re: [CLI] multiple args
Date Fri, 14 Jun 2002 05:29:44 GMT

This probably isn't a general solution, but how about rules for the
leftover array?

So for a command that runs Maven, it would try harder to fill the leftover
array with one value than the -D flag?

Another idea would be legal patterns for argument values? So below you
could specify that the -D argument must contain an '=' sign or some such?

Just ideas. Definite flaws to them.

Hen

On Fri, 14 Jun 2002, bob mcwhirter wrote:

>
> Howdy folks--
>
> We allow multiple values for an argument now, so that
>
> 	-D foo bar baz
>
> results in 'D' having 3 args.
>
> Now, I'd like to have multiple instances of single-arg options.
>
> To get the above, you'd have to do
>
> 	-D foo -D bar -D baz
>
> Why?
>
> 	maven -D maven.username=werken maven:deploy-site
>
> I want to allow multiple -D options, and have them anywhere
> in the command-line.
>
> Right now, that's interp'd as
>
> 	maven -D maven.username=werken -D maven:deploy-site
>
> Which is wrong.
>
> Workaround is reordering the command-line:
>
> 	maven maven:deploy-site -D maven.username=werken
>
> Seems like an arbitrary restriction.
>
> Any thoughts on how to hack in multiple-instances-single-arg options
> without adding yet-another-boolean-parameter to all of the signatures?
>
> Maybe time to re-arch, and have folks instantiate NoArgOption,
> SingleArgOption and MultiArgOption subclasses, and add them
> directly to Options?
>
> 	-bob
>
>
> --
> 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