gh completion -s fish > ~/.config/fish/completions/gh.fish

Category: GitHub CLI

gh completion -s fish > ~/.config/fish/completions/gh.fish

Install fish completion for gh

Generates the fish completion script into fish's completions directory, where it loads on the next shell start. Fish autoloads completion files by command name, so gh.fish is picked up automatically. Works identically for powershell with -s powershell.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.