Uploaded image for project: 'Commons CLI'
  1. Commons CLI
  2. CLI-218

Add function similar to getOptionValue() that returns last value

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.3
    • Component/s: CLI-1.x
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sven.koehler Sven
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: