zsh-completions
Completion scripts for hundreds of commands Zsh does not ship definitions for.
What it does
A community collection of _command completion functions — cloud CLIs, package managers, build tools, language toolchains — that Zsh’s bundled set does not cover. Installing it is a matter of putting its directory on fpath before compinit runs.
# ~/.zshrc, before compinit
FPATH="/opt/homebrew/share/zsh-completions:$FPATH"
autoload -Uz compinit && compinitNotes
If completions stop updating after an install, the cache is stale: rm -f ~/.zcompdump* and start a new shell.
Alternative to
| Alternative | Type | Trade-off |
|---|---|---|
| oh-my-zsh or prezto | Open source | Frameworks that bundle these completions among much else |
| zinit or antidote | Open source | Plugin managers that can load them on demand |
| Fish | Open source | Generates completions from man pages automatically |
Install
brew install zsh-completions