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

Show expanded help #1506

Closed
YuriGal opened this issue Apr 20, 2021 · 3 comments
Closed

Show expanded help #1506

YuriGal opened this issue Apr 20, 2021 · 3 comments

Comments

@YuriGal
Copy link

YuriGal commented Apr 20, 2021

Is there a way to display short descriptions when global help command is called, e.g.

myprogram help

# Commands:
#  command1 <parameter>  description 1 goes here
#  command2 <parameter>  description 2 goes here   

but also have ability to show expanded help when help for specific command is called:

myprogram help command1

# command1 is used for...
#
# ... detailed description
#
# ...
@shadowspawn
Copy link
Collaborator

There is not currently support for setting different descriptions for the two use cases, but there is some support for providing a custom solution yourself. You can customise commandDescription() and subcommandDescription() using .configureHelp() or a Help subclass.

(You can also add extra text to the specific command help with .addHelpText(), but that is different than what you were asking.)

Related: #898 #1291

@YuriGal
Copy link
Author

YuriGal commented Apr 20, 2021

Thanks for the prompt response and pointing me to the right direction!

@shadowspawn
Copy link
Collaborator

Opened a PR to add .summary() for a short summary to use when listing subcommands.

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