snippetbashTip
gh completion — Generate shell completion scripts for GitHub CLI commands. More information: <https://cli.github.com
Viewed 0 times
shellcommandcompletionforcligh completionscriptsgenerate
Problem
How to use the
gh completion command: Generate shell completion scripts for GitHub CLI commands. More information: <https://cli.github.com/manual/gh_completion>.Solution
gh completion — Generate shell completion scripts for GitHub CLI commands. More information: <https://cli.github.com/manual/gh_completion>.Print a completion script:
gh completion {{[-s|--shell]}} {{bash|zsh|fish|powershell}}Append the
gh completion script to ~/.bashrc:gh completion {{[-s|--shell]}} bash >> ~/.bashrcAppend the
gh completion script to ~/.zshrc:gh completion {{[-s|--shell]}} zsh >> ~/.zshrcDisplay the subcommand help:
gh completionCode Snippets
Print a completion script
gh completion {{[-s|--shell]}} {{bash|zsh|fish|powershell}}Append the `gh` completion script to `~/.bashrc`
gh completion {{[-s|--shell]}} bash >> ~/.bashrcAppend the `gh` completion script to `~/.zshrc`
gh completion {{[-s|--shell]}} zsh >> ~/.zshrcDisplay the subcommand help
gh completionContext
tldr-pages: common/gh completion
Revisions (0)
No revisions yet.