You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a command line tool with three verbs.
One is supposed to be used almost all the time. Is it possible to use it as default, unless one of the other verbs are specified, so e.g.
mycmd.exe --verb1optionA --verb1optionB
does the same as
mycmd.exe verb1 --verb1optionA --verb1optionB
And the user can specify verb2 or verb3 if they want to do something else?
The text was updated successfully, but these errors were encountered:
Hi @rwatjen, no that is not possible today in 2.x. If you choose to use verbs and leave one out of the arguments, parsing will return a BadVerbSelectedError. You could pop one on the front before parsing if you notice args[0] begins with a -, but it's not a great developer experience. I like the idea, though.
I have a command line tool with three verbs.
One is supposed to be used almost all the time. Is it possible to use it as default, unless one of the other verbs are specified, so e.g.
mycmd.exe --verb1optionA --verb1optionB
does the same as
mycmd.exe verb1 --verb1optionA --verb1optionB
And the user can specify verb2 or verb3 if they want to do something else?
The text was updated successfully, but these errors were encountered: