commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Bourg (JIRA)" <>
Subject [jira] Commented: (CLI-192) single character arguments are wrongly interpreted as short options
Date Sat, 19 Jun 2010 22:58:23 GMT


Emmanuel Bourg commented on CLI-192:

I tried to reproduce your issue with this test:

Options options = new Options();

CommandLine cmd = parser.parse(options, new String[] { "--foo", "o" });

assertEquals("o", cmd.getOptionValue("foo"));

I ran it against CLI 1.1 and 1.2, with the Posix, GNU and Basic parsers. It worked every time.
It works also with the default parser on the trunk.

Could you show me how you configured your options please?

> single character arguments are wrongly interpreted as short options
> -------------------------------------------------------------------
>                 Key: CLI-192
>                 URL:
>             Project: Commons CLI
>          Issue Type: Bug
>    Affects Versions: 1.1
>         Environment: linux
>            Reporter: dave rodgman
> If I have a command line which supports "-o"
> or equivalently "--option", and "-foo", then
> --foo o
> gets interpreted as if I had typed "--foo -o", i.e. the "o" is (wrongly) seen as an option
> instead of an argument to "--foo". Foo then (wrongly) has no arguments.

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

View raw message