Command-line completion
作者:James Zhu ([email protected])
创建日期:2018-10-24
步骤
wget https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O ~/.docker-completion.sh
wget https://raw.githubusercontent.com/docker/compose/master/contrib/completion/bash/docker-compose -O ~/.docker-compose-completion.sh
wget https://raw.githubusercontent.com/docker/machine/master/contrib/completion/bash/docker-machine.bash -O ~/.docker-machine-completion.sh
and add the following to the end of your ~/.bash_profile
(or ~/.bash_rc
if running Linux) :
. ~/.docker-completion.sh
. ~/.docker-machine-completion.sh
. ~/.docker-compose-completion.sh
Now source (if running Linux, source ~/.bash_rc
)
source ~/.bash_profile