Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mac配置git自动补全 #6

Open
PunkMoon opened this issue Sep 11, 2017 · 0 comments
Open

mac配置git自动补全 #6

PunkMoon opened this issue Sep 11, 2017 · 0 comments

Comments

@PunkMoon
Copy link
Owner

PunkMoon commented Sep 11, 2017

mac配置git自动补全

安装homebrew

如果事先没有安装homebrew,执行命令

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

安装 bash-completion

brew install bash-completion

修改 ~/.bash_profile

cd ~
nano .bash_profile

将下面的语句添加到.bash_profile

source ~/.git-completion.bash
if [ -f $(brew --prefix)/etc/bash_completion ]; then
  . $(brew --prefix)/etc/bash_completion
fi

保存后重启terminal即可。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant