gh
Completion for the GitHub CLI — no aliases. On each
new shell it regenerates gh completion --shell zsh into $ZSH_CACHE_DIR in
the background, so completions always match the installed gh version.
Pro tips
- Tab through subcommands, flags, and even flag values —
gh pr checkout <TAB>won't complete PR numbers, but every subcommand and--flagdoes, which is where the muscle-memory savings are. gh pr checkout <number>is the fastest way to pull down an OSS contributor's PR for local review — it handles the fork remote and branch tracking for you.gh run watchlive-tails a GitHub Actions run in the terminal; pair it withgh run listcompletion to grab the run. Beats refreshing the Actions tab while waiting on CI for OSS repos.- Scope check:
ghis for github.com work only. StumpCloud repos live on https://gitea.stump.rocks — useteaor the Gitea MCP there. Ifghsays "not a GitHub repository", you're probably standing in a Gitea-remoted clone. - Completions also cover
gh apipaths andgh extensionsubcommands, so installed extensions get tab-completion automatically. - If completion ever feels stale after a
brew upgrade gh, just open a new shell — the plugin refreshes the cached script on load.