Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commands and flags are styled in multiple ways #8348

@muzimuzhi

Description

@muzimuzhi

CLI Feedback

Among all the manual pages (https://cli.github.com/manual/), currently special code-like phrases used inline are marked inconsistently: each of the style "...", '...', ..., and no delimiters can be found.

To list some types:

  • full commands (gh help issue)
  • flags (--json)
  • environment variables (GH_PATH, mostly in https://cli.github.com/manual/gh_help_environment)
  • paths to files
  • scope names (repo)
  • special flag values (true)
  • value patterns ([HOST/]OWNER/REPO)
  • misc (sh, POST)

For example, in command description part,

What have you loved?

A consistent styling

What was confusing or gave you pause?

These special phrases appear not only in multiline command descriptions, but also in command-line help outputs.

In the latter case, currently double quotes are most frequently used.

Anything else?

In #8342 I proposed changes which unifies styling of commands, flags, env vars, and paths to files to be surrounded by a pair of backticks `...`, for all cases found in raw strings used in long: heredoc.Doc(`...`), Long: heredoc.Doc(`...`), and Long: heredoc.Docf(`...`, "`").

This makes those phrases styled the same as flags in "Options" sections.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions