mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
26 lines
587 B
Plaintext
26 lines
587 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# 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 >> ~/.bashrc`
|
|
|
|
- Append the `gh` completion script to `~/.zshrc`:
|
|
|
|
`gh completion {{[-s|--shell]}} zsh >> ~/.zshrc`
|
|
|
|
- Display the subcommand help:
|
|
|
|
`gh completion`
|