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

CentOs 7下设置docker & docker-compose命令行自动补全 #169

Open
v5tech opened this issue Dec 18, 2017 · 1 comment
Open

CentOs 7下设置docker & docker-compose命令行自动补全 #169

v5tech opened this issue Dec 18, 2017 · 1 comment

Comments

@v5tech
Copy link
Owner

v5tech commented Dec 18, 2017

安装bash_completion

yum install bash_completion

安装docker命令自动补全

sudo curl -L https://raw.githubusercontent.com/docker/docker/v$(docker version -f "{{.Client.Version}}")/contrib/completion/bash/docker -o /etc/bash_completion.d/docker

安装docker-compose命令自动补全

sudo curl -L https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose

修改~/.bash_profile

vim ~/.bash_profile
# 添加如下内容
[ -f /etc/bash_completion.d ] && . /etc/bash_completion.d

设置使其生效

source ~/.bash_profile
@v5tech v5tech changed the title Centos 7下设置docker & docker-compose命令行自动补全 CentOs 7下设置docker & docker-compose命令行自动补全 Dec 18, 2017
@sinngae
Copy link

sinngae commented Dec 5, 2018

yum install bash-completion

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

2 participants