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

Add function similar to getOptionValue() that returns last value

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2
    • 1.3
    • CLI-1.x
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: