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 optional summary for short form of subcommand description. #1726

Merged
merged 2 commits into from
May 18, 2022

Conversation

shadowspawn
Copy link
Collaborator

@shadowspawn shadowspawn commented May 18, 2022

Pull Request

Problem

The same description is used in the compact listing of subcommands, as in the full help for a subcommand. In the former case a one-liner makes sense, but may want multiple lines in the full command description.

Related: #898 #1291 #1469 #1506

A work-around is to add a long description after the built-in help in .addHelpText('after', longDescription).

Solution

Add optional .summary().

For backwards compatibility, the description is used for the subcommand listing if the summary is missing. So by default there is no change in existing programs.

ChangeLog

  • Add .summary() for a short summary to use instead of description when listing subcommands in help

Copy link
Collaborator

@abetomo abetomo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@shadowspawn shadowspawn added the pending release Merged into a branch for a future release, but not released yet label May 18, 2022
@shadowspawn shadowspawn merged commit cc2db5b into tj:develop May 18, 2022
@shadowspawn shadowspawn deleted the feature/command-summary branch May 18, 2022 08:23
@shadowspawn shadowspawn removed the pending release Merged into a branch for a future release, but not released yet label Jul 15, 2022
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 this pull request may close these issues.

2 participants