Skip to content

Instantly share code, notes, and snippets.

@bdwyertech
Created December 12, 2017 22:38
Show Gist options
  • Save bdwyertech/6133025f60f62ceab83716380ec2cef4 to your computer and use it in GitHub Desktop.
Save bdwyertech/6133025f60f62ceab83716380ec2cef4 to your computer and use it in GitHub Desktop.
Docker - Bash Completion

On OS X with Docker for Mac installed

for prog in 'docker' 'docker-machine' 'docker-compose'; do
  ln -sf /Applications/Docker.app/Contents/Resources/etc/${prog}.bash-completion /usr/local/etc/bash_completion.d/${prog}
done

On a *nix Box

COMPOSE_VERSION=1.17.1
curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VERSION}/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment