Closed natachaS closed 8 years ago
Do you mean to an existing command? Please clarify a little.
Thanks for getting back so quickly !
I meant i have set up command 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).
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?
No it still works but it could let the user know that too many arguments have been entered for extra validation.
Not going to do anything else on this for now, so closing.
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 ?