A zsh plugin for the Homebrew package manager.
Using the ⚡ Zap minimal zsh plugin manager, add the following to your .zshrc
# Install plugin
plug "wintermi/zsh-brew"
# Load and initialise completion system
autoload -Uz compinit
compinit -d "${ZDOTDIR:-$HOME}/.zcompdump"
If you do not have the brew install directory already within your $PATH
, be sure to include this plugin before any additional plugins that use applications installed via brew (e.g. eza, starship, etc.).
A check will be performed to verify that brew
has been installed:
brew
- Homebrew - The missing package manager for macOS (or Linux)
This plugin will ensure that any brew
installed package which contains shell completions and site functions have been correctly configured for zsh
to utilise, though we no longer execute the compinit
directly within the plugin to reduce the overall zsh
shell startup time. Therefore we recommend you add the following to your .zshrc
after all plugins have been loaded and try to ensure that it is executed only once.
# Load and initialise completion system
autoload -Uz compinit
compinit -d "${ZDOTDIR:-$HOME}/.zcompdump"
The zsh-brew plugin is released under the Apache License 2.0 unless explicitly mentioned in the file header.