Skip to content

zsh-completions

Completion scripts for hundreds of commands Zsh does not ship definitions for.

Homebrew formula

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 && compinit

Notes

If completions stop updating after an install, the cache is stale: rm -f ~/.zcompdump* and start a new shell.

Alternative to

AlternativeTypeTrade-off
oh-my-zsh or preztoOpen sourceFrameworks that bundle these completions among much else
zinit or antidoteOpen sourcePlugin managers that can load them on demand
FishOpen sourceGenerates completions from man pages automatically

Install

brew install zsh-completions

Links

This post is licensed under CC BY 4.0 by the author.
Last updated on