dthree / vorpal

Node's framework for interactive CLIs
http://vorpal.js.org
MIT License
5.64k stars 280 forks source link

Remove 'options' #80

Closed natachaS closed 8 years ago

natachaS commented 8 years ago

How could i remove [options] and specify that a command should not take options ? Will an error be displayed then if the user enters 3 arguments instead of 4 ?

dthree commented 8 years ago

Do you mean to an existing command? Please clarify a little.

natachaS commented 8 years ago

Thanks for getting back so quickly ! I meant i have set up command set up but if the user goes in and types: command arg1 arg2 someString How can i return an error to the user stating that he entered too many arguments ? (my commands don't use any options).

dthree commented 8 years ago

Thanks.

I looked at this - interestingly it looks like right now it's really permissive on extra arguments. It just eats them.

If you don't enter enough arguments, it automatically validates for you, but if you enter too many, it just ignores the extra ones.

Is there any particular reason ignoring it won't work?

natachaS commented 8 years ago

No it still works but it could let the user know that too many arguments have been entered for extra validation.

dthree commented 8 years ago

Not going to do anything else on this for now, so closing.