git自動補齊
阿新 • • 發佈:2018-12-13
請參考官方的git-completion
https://github.com/git/git/blob/master/contrib/completion/git-completion.bash
下面的東西就當我放了個屁!!!
參考:https://blog.csdn.net/qianggezhishen/article/details/50585512
一、下載git自動補齊指令碼到家目錄
[email protected]:~# curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
二、編輯bashrc檔案,每次開啟bash都載入此指令碼
[email protected]:~# vim ~/.bashrc
[email protected]:~# tail -3 ~/.bashrc
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
[email protected]:~#
三、執行source命令,讓bashrc在當前終端生效
[email protected]:~# source ~/.bashrc
測試已經OK