Skip to content

Default help and completion command descriptions are inconsistent #1458

Closed
@brianstrauch

Description

@brianstrauch

As of v1.2.0, there are two commands that are included by default in every Cobra CLI. Their formatting is inconsistent, which is incredibly sloppy, especially considering that their descriptions can't be changed; to my knowledge these commands can only be hidden.

First, one Short description is uppercased, and one is lowercased. Recommendation: Make them both uppercase.

Available Commands:
  completion  generate the autocompletion script for the specified shell
  help        Help about any command

Second, one Long description has an extra leading newline, and the other does not. Recommendation: Remove the extra newline.

$ cmd completion -h

Generate the autocompletion script for spotify for the specified shell.
See each sub-command's help for details on how to use the generated script.

...
$ cmd help -h
Help provides help for any command in the application.
Simply type cmd help [path to command] for full details.

...

In conclusion, it looks like the new completion command did not even attempt to maintain consistent formatting. A good long term solution would be to allow users to edit these descriptions to match their preferred style.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions