2011/2/26 Henrique Seganfredo <[email protected]>: > Hello Emmanuel, > > I´ve been trying to to this: > > Option db1topkds = OptionBuilder > .hasArgs(5) > .create("db1topkds"); > > When I execute the app without any option, help is displayed like this: > > MyApp v.1.0 (c) 2011 > usage: MyApp > -db1topkds <arg> > > Why is not showing something like > > usage: MyApp > -db1topkds <arg1> <arg2> <arg3> <arg4> <arg5> > > ?? > > Any idea? Isn´t this the expected behavior? I am confused, does Commons-CLI > supports or not multiple arguments for an option? >
See the sources of the HelpFormatter class in CLI-1.x: That is how it works: it prints a single argument name only, and Option#argName field is "arg" by default. Neither I see support for providing separate names for the arguments. Note, that the count of arguments in an Option can be unlimited (Option.UNLIMITED_VALUES). Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
