Add root command fallback to a subcommand
trispo opened this issue · comments
Gunnar Herzog commented
We need the possibility to let the root command execute a subcommand. In our use case the root command does nothing. So it would be nice that if no subcommand is specified, a default subcommand is used.
Example:
We have a root command called rootCommand
with the sub commands foo
and bar
. foo
should be the default.
We want to call:
> rootCommand "Hello World"
instead of:
> rootCommand foo "Hello World"