You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sven (JIRA)" <ji...@apache.org> on 2011/04/30 17:27:03 UTC
[jira] [Created] (CLI-218) Add function similar to getOptionValue()
that returns last value
Add function similar to getOptionValue() that returns last value
----------------------------------------------------------------
Key: CLI-218
URL: https://issues.apache.org/jira/browse/CLI-218
Project: Commons CLI
Issue Type: New Feature
Components: CLI-1.x
Affects Versions: 1.2
Reporter: Sven
Often, you can invoke command with the same option multiple time. For example
java -cp test1 -cp test2
even though the option only accepts one value.
I believe, that the majority of programs then use the last value (test2 in this case).
However, getOptionValue() return the first value for some weired reason.
I believe, you should add a function called getLastOptionValue() (in class CommandLine) and getLastValue() (in class Option) to allow easy access to the last value.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CLI-218) Add function similar to
getOptionValue() that returns last value
Posted by "Sven (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CLI-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027338#comment-13027338 ]
Sven commented on CLI-218:
--------------------------
Also, the documentation of getOptionValue() doesn't even mention whether the last or first value is returned. This should be fixed as well.
> Add function similar to getOptionValue() that returns last value
> ----------------------------------------------------------------
>
> Key: CLI-218
> URL: https://issues.apache.org/jira/browse/CLI-218
> Project: Commons CLI
> Issue Type: New Feature
> Components: CLI-1.x
> Affects Versions: 1.2
> Reporter: Sven
>
> Often, you can invoke command with the same option multiple time. For example
> java -cp test1 -cp test2
> even though the option only accepts one value.
> I believe, that the majority of programs then use the last value (test2 in this case).
> However, getOptionValue() return the first value for some weired reason.
> I believe, you should add a function called getLastOptionValue() (in class CommandLine) and getLastValue() (in class Option) to allow easy access to the last value.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira