[zsh] Add homebrew site-functions to fpath

This commit is contained in:
Eryn Wells 2023-06-01 10:27:12 -07:00
parent 21ebcac9d5
commit f6774a6a13
3 changed files with 19 additions and 1 deletions

View file

@ -1,7 +1,7 @@
#!/usr/bin/env zsh
# Eryn Wells <eryn@erynwells.me>
autoload -U compinit
autoload -Uz compinit
compinit
# Cache completions

View file

@ -0,0 +1,17 @@
# Eryn Wells <eryn@erynwells.me>
autoload -Uz binary_exists
function init_rc_fpath_darwin
{
if binary_exists brew; then
local brew_fpath="$(brew --prefix)/share/zsh/site-functions"
if [[ -d "$brew_fpath" ]]; then
fpath+=($brew_fpath)
fi
export FPATH
fi
}
init_rc_fpath_darwin "$@"