Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
680 views
in Technique[技术] by (71.8m points)

WARNING: this script is deprecated, please see git-completion.zsh

I'm using oh-my-zsh and I get this error every time I open terminal:

WARNING: this script is deprecated, please see git-completion.zsh

is there any solution to that?

question from:https://stackoverflow.com/questions/24315201/warning-this-script-is-deprecated-please-see-git-completion-zsh

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Might seems silly, but make sure that you source your ~/.zshrc file (create one if it does not exists). On OSX I completely forgot that I had switched to zsh, and got the error you mentioned because I was doing source ~/.bashrc

  1. The easiest way to get auto-completion working is to install it through Homebrew (it will work for zsh as well as bash.):
brew install bash-completion
  1. Put this into your ~/.zshrc:
# auto-completion
if [ -f /opt/local/etc/profile.d/bash_completion.sh ]; then
  . /opt/local/etc/profile.d/bash_completion.sh
fi
  1. Save the file and do a source ~/.zshrc and you will be good

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...