commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Papendieck, Thomas" <Thomas.Papendi...@opitz-consulting.com>
Subject [cli] 1.2:HelpFormatter.autoUsage: '|' as separator of requierd options?
Date Tue, 16 Aug 2011 18:27:01 GMT
Hello

I created a group with 2 required options and an optional help option
When I invoke do this 

helpFormatter.printHelp("programName",options,true)

I get 

usage: programName [--opt1 <VALUE1> | --opt2 <VALUE2>][-h]

as the first line. But I would expect 

usage: programName [--opt1 <VALUE1>  --opt2 <VALUE2>][-h]

since both opt1 and opt2 are required. For me the pipe symbol means the options are alternative.
But that's not what I want.

Setting the OptionGroup itself "required" removes the braces '[]' around the first options
but not the pipe symbol.

Is this a bug or am I just missinterpreting the pipe symbol?

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


Mime
View raw message