Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 1.0
    • Fix Version/s: 1.1
    • Component/s: Parser
    • Labels:
      None
    • Bugzilla Id:
      36998

      Description

      Hi

      If one accidentally confuses the long and short argument name styles, then the value of the argument is
      incorrect. This is mad clear by an example:

      If I have a program that I call as follows:

      my_prog --file my_file.txt

      or

      my_prog -f my_file.txt

      but I make a typo and write

      my_prog -file my_file.txt

      then getOptionValue('f') will return "ile" (i.e. it thinks the remainder of the argument's name is the
      argument). "my_file.txt" will be ignored.

      This is clearly an error that the user has made, but I think that CLI should be able to detect such an
      error and throw an appropriate exception.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              junk5@microserf.org.uk C Rose
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: