docopt / docopt.go

A command-line arguments parser that will make you smile.
http://docopt.org/
MIT License
1.43k stars 111 forks source link

Issue with short arg parsing using optional space #56

Open kdawgwilk opened 6 years ago

kdawgwilk commented 6 years ago

The docent standard supports an optional space after short args like -c 50 and should be parsed into a "-c": "50" but it currently is parsed into "-c": " 50" which has the side effect of not being able to be coerced into a int type because of the space

From docent.org

Short options can have arguments specified after optional space: -f FILE is equivalent to -fFILE.