Skip to content

Add optional summary for short form of subcommand description. - #1726

Merged
shadowspawn merged 2 commits into
tj:developfrom
shadowspawn:feature/command-summary
May 18, 2022
Merged

shadowspawn merged 2 commits into
tj:developfrom
shadowspawn:feature/command-summary

Conversation

@shadowspawn

@shadowspawn shadowspawn commented May 18, 2022 •

Copy link
Copy Markdown
Collaborator

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

@abetomo abetomo left a comment

Copy link
Copy Markdown
Collaborator

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