Skip to content

default short help is too short #936

Closed

Description

@matejcik

My CLI tool has many commands with help strings. These are single sentences, intended to display on the command list page. I expect that if my terminal is wide enough, program --help will show full help strings for the commands. Instead, they are arbitrarily shortened after reaching 45 characters, regardless of terminal width and max_content_width of the context (as seen in #441).

I think I understand the intention behind separating help and short_help, and shortening the help if no separate short_help exists. I'd expect one of two things, though:

  • either applying max_content_width to short help and shortening based on terminal size,
  • or using short_help in place of help if the latter is not specified. As in, if I want the short and long help to be the same, then the same string should be displayed both in program --help and program withcommand --help, without me having to specify it twice.

Maybe also something like, make_default_short_help would use first line of long help, or maybe first sentence (help.split(r'\w\.\b'))?

Activity

  1. discosultan commented on Mar 23, 2018

    @discosultan

    Do I understand correctly that there is currently no way to specify a width for short help?

  2. dsully commented on May 15, 2018

    @dsully

    Merged #1002

  3. ixaxaar commented on Apr 17, 2019

    @ixaxaar

    Has this been removed since it was merged with #1008?
    #1002 and #936 still persist.

  4. locked as resolved and limited conversation to collaborators on Nov 13, 2020
  5. added
    help output
    on Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help output

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions