tools.cli

potential incorrect parsing

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • 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?

Activity

Hide
John Walker added a comment -

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

Show
John Walker added a comment - I am not able to reproduce this behavior. Would you create a gist or use code tags?

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: