commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rubin Simons (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CLI-217) Optional partial matching for long options
Date Tue, 06 Jun 2017 08:14:18 GMT

    [ 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:14 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:

{code}
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.
{code}

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,
partially specified" namely "debug". Note that this occurs 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:

{code}
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.
{code}

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,
partially specified" namely "debug". Note that this occurs 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)

Mime
View raw message