vvakame / commandpost

command line option parser for Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow root options to be passed into subcommand

ellis opened this issue · comments

Commandpost doesn't allow the user to pass a root option AFTER the subcommand.

For example, if I have a root option --user and a subcommand download, then it needs to be passed like this:

$ myapp --user me download # Works

But it would be great if the user could do this instead:

$ myapp download --user me # Currently Fails

It seems fairly common to allow the command to come first (like in git and commander). Could you please allow this in commandpost too?

sorry for late response.
It might be nice if developers can choose.
I am glad that you can send me a pull request. 😉