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

I use oh-my-zsh and I get this error every time I open a terminal:

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

is there any solution to this?

+17
git zsh oh-my-zsh
source share
3 answers

It may sound silly, but make sure you use the ~/.zshrc source file (create it if it doesn't exist). In OSX, I completely forgot that I switched to zsh and got the error you mentioned because I was doing source ~/.bashrc

The easiest way to get automatic completion is to install it via Homebrew with brew install bash-completion (it will work for both zsh and bash) and then put it in ~/.zshrc :

 # auto-completion if [ -f /opt/local/etc/profile.d/bash_completion.sh ]; then . /opt/local/etc/profile.d/bash_completion.sh fi 

Save the file and make source ~/.zshrc and everything will be fine

+9
source share

Enter this in your console:

curl https://github.com/git/git/raw/master/contrib/completion/git-completion.zsh -OL

Add this to one of your .profile / .bashrc / .zshrc :

source ~/git-completion.zsh

+4
source share

For me, I just copied the contents of ~/.bash_profile to ~/.zprofile when switching to zsh. I simply deleted this line, which was the main reason for the warning message:

source ~/.profile

0
source share

All Articles