<< Back to previous view

[TCLI-10] potential incorrect parsing Created: 23/Jul/14  Updated: 10/Aug/14

Status: Open
Project: tools.cli
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Travis Camechis Assignee: Gareth Jones
Resolution: Unresolved Votes: 0
Labels: None


 Description   

If i have these options defined

(def cli-options [ ["-i" "--interactive" "interactive cli mode"]
["-H" "--help" "show help"]
["h" "-host host" "hostname"
["-u" "--user user" "username to login to rulegate"]])

if I enter a command as follows

myprog -h myhost -u foo

my option output looks like { :host myhost :user foo }

however if I leave the host value off
{:host -u}

It appears to be treating the -u as the value for -h. I would expect a missing argument error. Is this the correct behavior?



 Comments   
Comment by John Walker [ 10/Aug/14 3:01 PM ]

I am not able to reproduce this behavior. Would you create a gist or use code tags?





Generated at Mon Aug 03 14:12:50 CDT 2015 using JIRA 4.4#649-r158309.