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

Adding the another hyphen code 96.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Won't Fix
    • 1.0, 1.1, 1.2
    • 1.3
    • Parser
    • None

    Description

      In the class Parser (rev 680644) close to line 190 there is code:

      Parser.java
      // the value is an option
      else if (t.startsWith("-"))
      {
      

      This line recognizes hyphen like -
      But sometimes (when someone has to work with MS Word Docs) this hyphen - can be used instead of -.
      So I would like to suggest just adding a simple piece of code like:

      Parser.java
      // the value is an option
      else if (t.startsWith("-") || t.startsWith("-"))
      {
      

      or try to throw an exception like "Option expected not " or "unexpected argument".

      Attachments

        1. TwoDifferentHyphens.txt
          0.0 kB
          Grzegorz Solecki

        Activity

          People

            Unassigned Unassigned
            soloman Grzegorz Solecki
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: