Files
tldr/pages/common/gh-completion.md
T
2025-09-22 03:56:22 +03:00

494 B

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