Skip to content

[gh config] Inconsistent formatting of GitHub CLI manual entry #10348

@iamazeem

Description

@iamazeem

Describe the bug

Apparently, when there's pipe sign | in the test, the formatting in the manual becomes inconsistent.
Looks like it's being rendered as a Markdown table.

See the screenshot for gh config below:

Image

The relevant output of gh config --help command:

$ gh config --help
Display or change configuration settings for gh.

Current respected settings:
- `git_protocol`: the protocol to use for git clone and push operations {https|ssh} (default https)
- `editor`: the text editor program to use for authoring text
- `prompt`: toggle interactive prompting in the terminal {enabled|disabled} (default enabled)
- `prefer_editor_prompt`: toggle preference for editor-based interactive prompting in the terminal {enabled|disabled} (default disabled)
- `pager`: the terminal pager program to send standard output to
- `http_unix_socket`: the path to a Unix socket through which to make an HTTP connection
- `browser`: the web browser to use for opening URLs
...

Affected settings are:

  • git_protocol
  • prompt
  • prefer_editor_prompt

Relevant code line where the allowed values are joined with |:

longDoc.WriteString(fmt.Sprintf(" {%s}", strings.Join(co.AllowedValues, "|")))

Affected version

$ gh version
gh version 2.66.0 (2025-01-30)
https://github.com/cli/cli/releases/tag/v2.66.0

Steps to reproduce the behavior

See https://cli.github.com/manual/gh_config.

Expected vs actual behavior

The formatting in the manual should be consistent.

Logs

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocshelp wantedContributions welcomep3Affects a small number of users or is largely cosmetic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions