Docker bash completion on Mac

brew install bash-completion
wget https://raw.githubusercontent.com/docker/docker-ce/master/components/cli/contrib/completion/bash/docker
mv docker $(brew --prefix)/etc/bash_completion.d

Add following settings in your .bashrc

if [ -f $(brew --prefix)/etc/bash_completion ]; then
    . $(brew --prefix)/etc/bash_completion
fi
comments powered by Disqus