Consider the following options scenario:
Option.builder("1").longOpt("one").hasArgs().build()
Option.builder("2").longOpt("two").hasArg().required().build()
with the following args:
String[] args = {"--one","arg1","-2","arg2"}
It should consider -2 as an argument or an option? Because, the option
I think this question only makes sense if you give the Options spec
you are using.
Using an Options with both of these:
Option.builder().longOpt('one').numberOfArgs(1).build()
Option.builder('2').numberOfArgs(1).build()
It treats the "-2" as you are expecting.
Using an Options with both of thes
I have a doubt on Apache Commons CLI
For DefaultParser, why is a negative number preferably considered as an
argument rather than an option
Consider the following case, for example:
String[] args= {"--one","arg1","-2","arg2"};
Here, -2 is considered as an argument to --one, even if there is a r