-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
If the subject class implements __invoke all other methods are ignored.
It would be nice if invoke was only used if the first parameter doesn't match a class method, defaulting to invoke.
This goes against one of my main CLI scripting principles but would be handy in some cases.
eg.
//test command
public funciton _invoke()//returns "a default value"
public funciton alternate()//returns "something else"
and usage would be:
$ test
a default output value
$ test alternate
something else
and using --help would still list the other commands available while somehow indicating that the commands are now optional and something else will happen if no command is provided.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels