8000 Mark-up special phrases differently on web and terminal · Issue #8481 · cli/cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Mark-up special phrases diffe 8000 rently on web and terminal #8481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
muzimuzhi opened this issue Dec 20, 2023 · 3 comments
Closed

Mark-up special phrases differently on web and terminal #8481

muzimuzhi opened this issue Dec 20, 2023 · 3 comments
Labels
docs enhancement a request to improve CLI needs-triage needs to be reviewed needs-user-input

Comments

@muzimuzhi
Copy link
Contributor

Describe the feature or problem you’d like to solve

My merged PR #8342 formatted all special phrases like commands (gh help issue), flags (--json), and special values (true) with backticks (`), which represented a web-first direction.

But as #8348 briefly mentioned, users might be more used to double-quotes instead of back-quotes when reading on terminal, for instance in manpages, gh help <subcommand> output, and perhaps also shell completions.

Proposed solution

Stick to backquote on web, but use double-quotes for terminal material.

Additional context

<empty>

@muzimuzhi muzimuzhi added the enhancement a request to improve CLI label Dec 20, 2023
@cliAutomation cliAutomation added the needs-triage needs to be reviewed label Dec 20, 2023
@muzimuzhi muzimuzhi changed the title Quote special phrases differently on web and terminal Mark-up special phrases differently on web and terminal Jan 7, 2024
@williammartin
Copy link
Member

@andyfeller can you triage this please, I have little context on the original PR and discussion.

8000

@mxie mxie added the docs label Jan 31, 2024
@andyfeller
Copy link
Member
andyfeller commented Mar 6, 2024

@williammartin : Apologies for the delay. @muzimuzhi is pointing out how the GitHub CLI using backticks is atypical in CLIs but is used by GitHub CLI website to format them as code. The suggestion is to enhance gh to format various pieces of Cobra command depending if it is used for help or the manual.

  • gh issue create --help:

    $ gh issue create --help
    Create an issue on GitHub.
    
    Adding an issue to projects requires authorization with the `project` scope.
    To authorize, run `gh auth refresh -s project`.
    
    
    USAGE
      gh issue create [flags]
    
    ALIASES
      new
    
    FLAGS
      -a, --assignee login   Assign people by their login. Use "@me" to self-assign.
      -b, --body string      Supply a body. Will prompt for one otherwise.
      -F, --body-file file   Read body text from file (use "-" to read from standard input)
      -l, --label name       Add labels by name
      -m, --milestone name   Add the issue to a milestone by name
      -p, --project name     Add the issue to projects by name
          --recover string   Recover input from a failed run of create
      -T, --template name    Template name to use as starting body text
      -t, --title string     Supply a title. Will prompt for one otherwise.
      -w, --web              Open the browser to create an issue
    
    INHERITED FLAGS
          --help                     Show help for command
      -R, --repo [HOST/]OWNER/REPO   Select another repository using the [HOST/]OWNER/REPO format
    
    EXAMPLES
      $ gh issue create --title "I found a bug" --body "Nothing works"
      $ gh issue create --label "bug,help wanted"
      $ gh issue create --label bug --label "help wanted"
      $ gh issue create --assignee monalisa,hubot
      $ gh issue create --assignee "@me"
      $ gh issue create --project "Roadmap"
    
    LEARN MORE
      Use `gh <command> <subcommand> --help` for more information about a command.
      Read the manual at https://cli.github.com/manual
  • gh issue create manual page

    Image

@muzimuzhi : I don't recall this being brought up in the original issue or PR, apologies. 🙇

  1. How would you describe the impact of using backticks for the formatting?
  2. How might you go about implementing this change, given your experience aligning command formatting?

@williammartin
Copy link
Member

Closing as this has gone stale. Feel free to reopen if we care about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs enhancement a request to improve CLI needs-triage needs to be reviewed needs-user-input
Projects
None yet
Development

No branches or pull requests

5 participants
0