detect duplicated values for given option?

35 views
Skip to first unread message

Mohammad Shamsi

unread,
Sep 12, 2013, 7:09:08 AM9/12/13
to jewe...@googlegroups.com
Hi,

Is there any way to detect if a given option is used more than one time in the command line?
example: "my-command  -f value1 -f value2"

apparently, in the case of duplicate options, the last one will be considered as given value for that options.

Thanks,

Tim Wood

unread,
Sep 12, 2013, 8:05:54 AM9/12/13
to jewe...@googlegroups.com, m.h....@gmail.com
Hi,

Which version are you using? Is your option single-valued or a list?

I believe that this was a bug and has already been fixed. If you are using the latest version and it is still a problem could you please raise a full bug report on github.

The latest version requires Java 7 though - although I am told its would not be difficult to correct this I have not had time yet. Let me know if the Java 7 thing is blocking you here.

You can download recent version here:

http://repo1.maven.org/maven2/com/lexicalscope/jewelcli/jewelcli/

Cheers,

Tim



--
You received this message because you are subscribed to the Google Groups "jewelcli" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jewelcli+u...@googlegroups.com.
To post to this group, send email to jewe...@googlegroups.com.
Visit this group at http://groups.google.com/group/jewelcli.
For more options, visit https://groups.google.com/groups/opt_out.

Mohammad Shamsi

unread,
Sep 12, 2013, 8:15:00 AM9/12/13
to jewe...@googlegroups.com, m.h....@gmail.com
It's a single value option.

Due to project constraints, I need to stick with Java 6, therefore I can't use latest version.

Tim Wood

unread,
Sep 12, 2013, 8:33:00 AM9/12/13
to jewe...@googlegroups.com, m.h....@gmail.com
Hi,

Which version are you using?

Cheers,

Tim

Mohammad Shamsi

unread,
Sep 12, 2013, 10:41:17 PM9/12/13
to jewe...@googlegroups.com, m.h....@gmail.com
Hi,

we are using  0.8.3. 

Cheers,

Tim Wood

unread,
Sep 16, 2013, 6:52:22 PM9/16/13
to jewe...@googlegroups.com, m.h....@gmail.com
Hi,

Please try the new version 0.8.6 which should work with java 6 and will sync to maven central in the next few hours hopefully.

Cheers,

Tim
Reply all
Reply to author
Forward
0 new messages