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 install glab through a package manager, you might not need any more shell configuration to support completions. For Homebrew, see brew 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 πŸ’œ

glab(1)


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