在~/.zshrc
配置文件里面添加如下代码:
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH
autoload -Uz compinit
compinit
fi
如果是使用了Oh My Zsh
,则需要在调用oh-my-zsh.sh
之前执行。
在~/.zshrc
配置文件里面添加如下代码:
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH
autoload -Uz compinit
compinit
fi
如果是使用了Oh My Zsh
,则需要在调用oh-my-zsh.sh
之前执行。