[ 
https://issues.apache.org/jira/browse/CLI-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13053804#comment-13053804
 ] 

Gilles commented on CLI-219:
----------------------------

None of the proposed workarounds really matches the look of a command-line 
achievable through other languages.
Is there any technical problem that prevents applying the patch?

Also, my personal opinion is that it is doing a disservice to users to let them 
forget quotes whenever they would be necessary to disambiguate between an 
option including a space character and two distinct options.
Historically, the space separates the tokens of a command line. If a token 
contains a space, it has to be enclosed within quotes. If this would be 
enforced by [CLI], then the problem of aggregating arguments to the last option 
token (of an option declared to take a variable number of arguments) would 
probably disappear. But this behaviour (although correct, IMO) would not be 
backward-compatible.

Consequently, the patch seems to be a good compromise.


> Allow to specify options with a single argument that will be split into 
> multiple arguments
> ------------------------------------------------------------------------------------------
>
>                 Key: CLI-219
>                 URL: https://issues.apache.org/jira/browse/CLI-219
>             Project: Commons CLI
>          Issue Type: New Feature
>          Components: CLI-1.x
>    Affects Versions: 1.2
>            Reporter: Gilles
>              Labels: features
>             Fix For: 1.3
>
>         Attachments: svn_diff.txt
>
>
> I've explained the issue in that thread:
>   http://www.mail-archive.com/[email protected]/msg06483.html
> As hinted there, a solution might be to allow that the (single) argument of 
> an "Option" (cf. "hasArg()") be split according to a user-defined regexp 
> pattern. If given a split pattern, the code would convert a single-arg 
> "Option" into a multiple-args one (where the arguments are the result of 
> splitting the single-arg string with the pattern).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to