google / subcommands

Go subcommand library.
Apache License 2.0
749 stars 48 forks source link

Kubectl / git like plugin system #30

Open luisdavim opened 4 years ago

luisdavim commented 4 years ago

It would be nice to be able to specify a prefix and if a subcommand is not found look for an executable in the PATH that matches prefix-subcommand and execute it if found, passing any args and flags to that executable. Like git and kubectl do.

luisdavim commented 4 years ago

Another option could be to allow defining a catchall handler if no subcommand matches, that would make implementing the above simple.