glab(1)
β¨ NAME β¨
glab-completion β bestie, this one generates shell completion scripts for u π
πΈ SYNOPSIS πΈ
glab completion [flags]
π¦ DESCRIPTION π¦
Okay so this command prints out code that's literally meant to be saved to a file or evaluated right away by an interactive shell. That's the whole vibe. To load completions:
π Bash π
To load completions in your current shell session, run:
source <(glab completion -s bash)
To load completions for every new session, run this command one time:
π» Linux
glab completion -s bash > /etc/bash_completion.d/glab
π macOS
glab completion -s bash > /usr/local/etc/bash_completion.d/glab
π Zsh π
If shell completion isn't already enabled in ur environment, you must enable it. Run this command one time:
echo "autoload -U compinit; compinit" >> ~/.zshrc
To load completions in your current shell session:
source <(glab completion -s zsh); compdef _glab glab
To load completions for every new session, run this command one time:
π» Linux
glab completion -s zsh > "${fpath[1]}/_glab"
π macOS
For older versions of macOS, you might need this command:
glab completion -s zsh > /usr/local/share/zsh/site-functions/_glab
The Homebrew version of glab should install completions automatically. slay π«Ά
π fish π
To load completions in your current shell session:
glab completion -s fish | source
To load completions for every new session, run this command one time:
glab completion -s fish > ~/.config/fish/completions/glab.fish
β‘ PowerShell β‘
To load completions in your current shell session:
glab completion -s powershell | Out-String | Invoke-Expression
To load completions for every new session, add the output of the above command to your PowerShell profile. periodt.
Okay but real talk: when you installglabthrough a package manager, you might not need any more shell configuration to support completions. For Homebrew, seebrew shell completionβ¨https://docs.brew.sh/Shell-Completionβ© π
π₯ OPTIONS π₯
--no-desc[=false]β nope, no descriptions in ur shell completion, thank u very much π-s,--shell="bash"β pick ur shell type bestie, the options are:bash,zsh,fish,powershell.
π OPTIONS INHERITED FROM PARENT COMMANDS π
-h,--help[=false]β show help for this command, the classic π
β EXAMPLE β
# Load completions in the current zsh session
source <(glab completion -s zsh); compdef _glab glab
# Print the bash completion script
glab completion -s bash
π SEE ALSO π
Auto generated by spf13/cobra Β· Nov 2026 Β· glab(1) β and that's the whole page bestie, go forth and tab-complete ur little heart out β¨ππ
π¦ where this page comes from
- arch rolling: glab 1.128.0-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms