2025-03-14 21:59:59 -06:00
|
|
|
# gh completion
|
|
|
|
|
|
|
|
|
|
> Generate shell completion scripts for GitHub CLI commands.
|
|
|
|
|
> More information: <https://cli.github.com/manual/gh_completion>.
|
|
|
|
|
|
|
|
|
|
- Print a completion script:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`gh completion {{[-s|--shell]}} {{bash|zsh|fish|powershell}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Append the `gh` completion script to `~/.bashrc`:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`gh completion {{[-s|--shell]}} {{bash}} >> {{~/.bashrc}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Append the `gh` completion script to `~/.zshrc`:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`gh completion {{[-s|--shell]}} {{zsh}} >> {{~/.zshrc}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Display the subcommand help:
|
|
|
|
|
|
|
|
|
|
`gh completion`
|