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

How to invoke a subcommand by default #1060

Closed
yeahdongcn opened this issue Mar 16, 2020 · 1 comment
Closed

How to invoke a subcommand by default #1060

yeahdongcn opened this issue Mar 16, 2020 · 1 comment

Comments

@yeahdongcn
Copy link

I'm wondering whether a command could be able to call its subcommand by default. The commands hierarchy can be described as the following:

rootCmd (A) ->
Cmd (B) ->
Subcommand 1 (C)
Subcommand 2 (D)

If I don't specify the actual subcommand, say type A B -args, is it possible to validate and invoke A B C -args?

@yeahdongcn yeahdongcn changed the title How to invoke the default subcommand by default How to invoke a default subcommand by default Mar 17, 2020
@yeahdongcn yeahdongcn changed the title How to invoke a default subcommand by default How to invoke a subcommand by default Mar 17, 2020
@umarcor
Copy link
Contributor

umarcor commented Mar 18, 2020

See #725. I think this might be a dup of #823.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants