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

Subcommands are not shown in usage unless they have their help text specified #85

Closed
arocnies opened this issue Sep 4, 2019 · 1 comment · Fixed by #87
Closed

Subcommands are not shown in usage unless they have their help text specified #85

arocnies opened this issue Sep 4, 2019 · 1 comment · Fixed by #87

Comments

@arocnies
Copy link

arocnies commented Sep 4, 2019

It seems commands are only listed in the usage if they have non-empty help text.
Steps to reproduce:

  1. Copy tool example from https://ajalt.github.io/clikt/commands/
  2. Run the main method and see that the usage does not contain the execute command
  3. Add non-empty help text to Execute class (e.g. CliktCommand(help = "Foo")
  4. Run the main method and see the usage now contains the execute command

Expected behavior (using the "tool" example from https://ajalt.github.io/clikt/commands/):

$ ./tool
Usage: tool [OPTIONS] COMMAND [ARGS]...

Options:
--verbose / --no-verbose
-h, --help Show this message and exit

Commands:
execute

Actual:

$ ./tool
Usage: tool [OPTIONS] COMMAND [ARGS]...

Options:

-h, --help Show this message and exit

Commands:

@ajalt
Copy link
Owner

ajalt commented Sep 9, 2019

Thanks for the report!

@ajalt ajalt closed this as completed in #87 Sep 9, 2019
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

Successfully merging a pull request may close this issue.

2 participants