You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Rubin Simons (JIRA)" <ji...@apache.org> on 2017/06/06 08:11:18 UTC

[jira] [Comment Edited] (CLI-217) Optional partial matching for long options

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

Rubin Simons edited comment on CLI-217 at 6/6/17 8:10 AM:
----------------------------------------------------------

I was wondering why this issue didn't make it into 1.4. I'm affected by this issue in combination with combined options (like described in #216). Example:

{{
Usage: foo [-c | -e | -h | -l | -s | -v] [-d]
 -c,--check     Check configuration settings.
 -d,--debug     Turn on debug messages.
 -e,--extract   Extract data from rdbms into csv files.
 -h,--help      Show this usage text.
 -l,--load      Load csv files into neo4j.
 -s,--setup     Configure settings interactively.
 -v,--version   Show the version.
}}

Specifying "-dc" passes debug and check to the application. However, specifying "-de" does not pass debug and extract to the application but is instead interpreted as a "long option", even though a single minus sign is used.




was (Author: rubin):
I was wondering why this issue didn't make it into 1.4. I'm affected by this issue in combination with combined options (like described in #216). Example:

Usage: foo [-c | -e | -h | -l | -s | -v] [-d]
 -c,--check     Check configuration settings.
 -d,--debug     Turn on debug messages.
 -e,--extract   Extract data from rdbms into csv files.
 -h,--help      Show this usage text.
 -l,--load      Load csv files into neo4j.
 -s,--setup     Configure settings interactively.
 -v,--version   Show the version.

Specifying "-dc" passes debug and check to the application. However, specifying "-de" does not pass debug and extract to the application but is instead interpreted as a "long option", even though a single minus sign is used.



> Optional partial matching for long options
> ------------------------------------------
>
>                 Key: CLI-217
>                 URL: https://issues.apache.org/jira/browse/CLI-217
>             Project: Commons CLI
>          Issue Type: Improvement
>          Components: Parser
>    Affects Versions: 1.3
>            Reporter: Emmanuel Bourg
>         Attachments: CLI-217.patch, optPartialMatch.patch
>
>
> DefaultParser support partial long options (i.e --ver matches --version if there is no ambiguity), but for some cases it might be necessary to disable this feature.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)