mac環境 git 子命令 補全:

 

1.安裝 :home-brew (包管理工具)—官網:  http://brew.sh/git

2.命令 : /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"github

3.安裝 bash-completion:      命令: brew install bash-completionruby

4.查找文件  :   sudo find / -name git-completion.bashbash

5.拷貝文件  :  cp /Library/Developer/CommandLineTools/usr/share/git-core/git-completion.bash ~/.git-completion.bashcurl

6.source 文件:  source ~/.git-completion.bash工具

7.修改或建立文件: ~/.bash_profile  內容爲:url

if [ -f ~/.bashrc ]; thenit

   source ~/.bashrcio

fiast

8.增長或修改 .bashrc 內容爲:

source ~/.git-completion.bash

 

9.重啓終端

相關文章
相關標籤/搜索