Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add root command fallback to a subcommand #98

Closed
trispo opened this issue Oct 2, 2019 · 0 comments · Fixed by #99
Closed

Add root command fallback to a subcommand #98

trispo opened this issue Oct 2, 2019 · 0 comments · Fixed by #99

Comments

@trispo
Copy link

trispo commented Oct 2, 2019

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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants