commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Bourg (JIRA)" <j...@apache.org>
Subject [jira] Created: (CLI-184) Negative arguments should take the priority over numerical options
Date Sat, 30 May 2009 13:25:07 GMT
Negative arguments should take the priority over numerical options
------------------------------------------------------------------

                 Key: CLI-184
                 URL: https://issues.apache.org/jira/browse/CLI-184
             Project: Commons CLI
          Issue Type: Bug
    Affects Versions: 1.1
            Reporter: Emmanuel Bourg
            Assignee: Emmanuel Bourg
             Fix For: 1.3


A negative argument can be mistaken for an option, for example with the options '1' and 'N'
both having an argument, the following command line:

{code}-N -123{code}

will be interpreted as the option N with no argument, and the option 1 with 23 as argument.
But the right interpretation is N=-123. The token -123 has been processed as a potential option
first before being considered as the argument of the previous option.

This is consistent with JOpt Simple.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message