cobra icon indicating copy to clipboard operation
cobra copied to clipboard

Help: how can I get nested sub command unknown message gracefully

Open xavier-hou opened this issue 2 years ago • 1 comments

For example, I have a root command with sub-command run. And sub command run have a nested sub-command test.

Suppose that my command line called foo. The problem is if I use foo set, it will print the error message unknown command "set" for "foo". But if I use a wrong command like foo run set, it will just print the usage rather than unknown sub command "set" for "run".

My question is how can I get the nested sub-command unknown message gracefully just like command?

#706

xavier-hou avatar May 18 '22 06:05 xavier-hou

The Cobra project currently lacks enough contributors to adequately respond to all issues. This bot triages issues and PRs according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied. - After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied and the issue is closed. You can:
  • Make a comment to remove the stale label and show your support. The 60 days reset. - If an issue has lifecycle/rotten and is closed, comment and ask maintainers if they'd be interseted in reopening

github-actions[bot] avatar Jul 19 '22 00:07 github-actions[bot]