Jaymon / captain

command line python scripts for humans
MIT License
13 stars 1 forks source link

parameter name in main-method must be at least three characters long #49

Closed ALee008 closed 5 years ago

ALee008 commented 5 years ago

Might not be a real issue but figured this while testing the captain module. It seems the parameter names in the main-method need to be at least 3 characters long, otherwise an exception is raised: tempsnip

Jaymon commented 5 years ago

So parse.py line 180 had:

if len(arg_name) > 2:

That > should be a >=, we never caught it because I guess we've never used a two character argument name (which I actually find kind of surprising). I've got the fix in version 2.0.5 and you'll want to pull from github to update:

$ pip install --upgrade "git+https://github.com/Jaymon/captain#egg=captain"

Nice catch :)