在mac上实现git命令行的自动完成

主要就是用这个文件:https://raw.github.com/git/git/master/contrib/completion/git-completion.bash。

1. 下载

curl https://raw.github.com/git/git/master/contrib/completion/git-completion.bash -O .git-completion.bash

2. 在你的.bash_profile或者.bashrc,或者.profile上加入:

if [ -f ~/.git-completion.bash ]; then
  . ~/.git-completion.bash
fi

One comment

Leave a Comment