[
https://issues.apache.org/jira/browse/CLI-244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14165475#comment-14165475
]
Siraj Abidi edited comment on CLI-244 at 10/9/14 6:23 PM:
----------------------------------------------------------
As mentioned by Thomas Neidhart in jura defect (CLI-221)
The withValueSeparator option does not mean that the arguments must be
concatenated by this separator. It currently works only as an optional
splitting mechanism. Any (whitespace) separated tokens after the option will be
treated as its arguments.
Considering this argument even if we define value separator as "," for option
"-f" and passing arguments separated by space should not give parse exception.
This is the expected behavior.
Correct me if my understanding is wrong.
was (Author: [email protected]):
As mentioned by in
The withValueSeparator option does not mean that the arguments must be
concatenated by this separator. It currently works only as an optional
splitting mechanism. Any (whitespace) separated tokens after the option will be
treated as its arguments.
Considering this argument even if we define value separator as "," for option
"-f" and passing arguments separated by space should not give parse exception.
This is the expected behavior.
Correct me if my understanding is wrong.
> Non-existing option is not reported as a failure when it follows an option
> that accepts multiple values
> -------------------------------------------------------------------------------------------------------
>
> Key: CLI-244
> URL: https://issues.apache.org/jira/browse/CLI-244
> Project: Commons CLI
> Issue Type: Bug
> Components: CLI-1.x
> Affects Versions: 1.2
> Environment: Java 7
> Linux/Windows
> Reporter: Ivan C
> Priority: Critical
>
> If I define the following options:
> Option dest = OptionBuilder
> .withArgName("-d")
> .withDescription("Destination")
> .hasArg()
> .create("-d");
> dest.setRequired(true);
> Option filenames = OptionBuilder
> .withArgName("-f")
> .withDescription("Filenames; comma separated")
> .hasArgs()
> .withValueSeparator(',')
> .create("-f");
> when I parse the following arguments
> -d c:\development\test -f abc.txt -qa hello
> rather than getting a ParseException, the code thinks abc.txt, -qa, hello are
> the values for the -f option.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)