gh completion

Generate shell completion scripts


Generate shell completion scripts for GitHub CLI commands.

For example, for bash you could add this to your ‘~/.bash_profile’:

eval "$(gh completion)"

When installing GitHub CLI through a package manager, however, it’s possible that no additional shell configuration is necessary to gain completion support. For Homebrew, see

gh completion [flags]


  -s, --shell string   Shell type: {bash|zsh|fish|powershell} (default "bash")

Options inherited from parent commands

      --help              Show help for command
  -R, --repo OWNER/REPO   Select another repository using the OWNER/REPO format