问题
git 无法按tab键提示。
问题环境
version:10.15.7
shell version:zsh
解决方案
User% brew install zsh-completion
1.有.zshrc就添加下面内容,没有就创建后添加
vi ~/.zshrc
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh-completions:$FPATH
autoload -Uz compinit
compinit
fi
2.rebuild zcompdump
and fix some warnings which maybe shown if the permission is lost.
rm -f ~/.zcompdump; compinit
chmod go-w '/usr/local/share'