yum install -y bash-completion

source /usr/share/bash-completion/bash_completion

执行后yum拥有选项自动补全功能

 

对于docker-compose还需要安装(docker不需要):

curl -L https://raw.githubusercontent.com/docker/compose/1.22.0/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose

source  /etc/bash_completion.d/docker-compose

 

k8s中kubectl指令的补全

source  < (kubectl completion bash)

echo  "source  <(kubectl completion bash)"  >>  ~/.bashrc

 

git命令补全:

yum install  git-extras  gitflow  -y

source   /etc/bash_completion.d/*  

wget  -O  /etc/bash_completion.d/git-completion.bash    https://raw.githubusercontent.com/markgandolfo/git-bash-completion/master/git-completion.bash

.   /etc/bash_completion.d/git-completion.bash

 

posted on 2018-09-04 10:42  苦咖啡~~  阅读(346)  评论(0编辑  收藏  举报