LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

gh-completion

generate shell completion scripts

TLDR

Generate bash completions
$ gh completion -s bash > ~/.local/share/bash-completion/completions/gh
copy
Generate zsh completions
$ gh completion -s zsh > "${fpath[1]}/_gh"
copy
Generate fish completions
$ gh completion -s fish > ~/.config/fish/completions/gh.fish
copy
Generate PowerShell completions
$ gh completion -s powershell | Out-String | Invoke-Expression
copy

SYNOPSIS

gh completion -s shell

DESCRIPTION

gh completion generates shell completion scripts for the GitHub CLI. These scripts enable tab completion for gh commands, subcommands, flags, and dynamic values like repository names and branches.The completions integrate with each shell's native completion system, providing context-aware suggestions. Dynamic completions query GitHub for repositories, issues, and pull requests.Completion scripts should be regenerated after gh updates to include new commands.

PARAMETERS

-s SHELL, --shell SHELL

Shell type: bash, zsh, fish, powershell.
--help
Display help information.

INSTALL

sudo apt install gh
copy
sudo dnf install gh
copy
sudo pacman -S github-cli
copy
sudo apk add github-cli
copy
sudo zypper install gh
copy
brew install gh
copy
nix profile install nixpkgs#gh
copy

CAVEATS

Output must be saved to appropriate shell completion directory. Shell may need restart or sourcing to load completions. Dynamic completions require authentication.

HISTORY

gh completion is built into the GitHub CLI, following Unix conventions for providing shell integration via completion scripts.

SEE ALSO

gh(1), bash(1), zsh(1), fish(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid