git unknown option
HillLiu opened this issue · comments
Hill Liu commented
git Unknown option: --list-cmds=list-mainporcelain,others,nohelpers,alias,list-complete,config
Hill Liu commented
use different version git autocomplete
git218=`git version | awk '{ split($3, a, "."); print (a[1]>2 || a[2]>=18) ? "YES" : "NO"}'`
if [ "$git218" = "YES" ]; then
if [ -e $HOME/bin/git-completion-2.21.0.bash ]; then
source $HOME/bin/git-completion-2.21.0.bash
fi
else
if [ -e $HOME/bin/git-completion.bash ]; then
source $HOME/bin/git-completion.bash
fi
fi