commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Bourg <ebo...@apache.org>
Subject Re: [CLI] Command-line arguments and option with mulitple arguments
Date Thu, 02 Jun 2011 23:44:55 GMT
Le 24/05/2011 21:41, Gilles Sadowski a écrit :

> one would indeed get 3 separate arguments even if they were passed as a
> single string "a b c" (or 'a b c') on the command-line.
>
> What do you think?

That's exactly what the value separator is for. If you set explicitly a 
space character as the value separator, you'll get 3 arguments out of 
the quoted string.

However that's a bit complicated just to get several arguments for an 
option. You should rather declare the option as accepting several 
arguments with the hasArgs() method.

Emmanuel Bourg

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


Mime
View raw message