Mac OSX 添加 Bash 自动补全支持
安装bash-completion
用homebrew安装
bash-completion
软件包:brew install bash-completion
把下面内容添加到你的
~/.bash_profile
:if [ -f $(brew --prefix)/etc/bash_completion ]; then . $(brew --prefix)/etc/bash_completion fi
重启bash,看看是不是很多命令都可以通过tab自动补全了?
添加其它自动补全支持
有些命令的自动补全支持不在bash-completion
内,这时候可以手动添加进去,以git为例:
cd /usr/local/opt/bash-completion/etc/bash_completion.d curl -L -O https://raw.github.com/git/git/master/contrib/completion/git-completion.bash brew unlink bash-completion brew link bash-completion
现在试试看,git 命令是不是已经可以自动补全了?
相关推荐
applecarelte 2020-10-16
touchfuture 2020-09-16
Testingba工作室 2020-09-15
TuxedoLinux 2020-09-11
guying 2020-08-16
haitianisgood 2020-07-21
luobotoutou 2020-07-20
luvzhan 2020-06-28
Jieen 2020-06-28
renshuguo 2020-06-24
cutdeer 2020-06-17
lishaokang 2020-06-08
DBATips 2020-06-07
xiaobater 2020-05-26
木子李CSDN 2020-05-18
死鱼喜欢猫 2020-05-15
hongsheyoumo 2020-05-14