Skip to content

Instantly share code, notes, and snippets.

@KernelPanicAUS
Forked from rkuzsma/docker-bash-completion.md
Created November 29, 2018 07:35
Show Gist options
  • Select an option

  • Save KernelPanicAUS/c6255f78671c5d518415e985dbf4d6b4 to your computer and use it in GitHub Desktop.

Select an option

Save KernelPanicAUS/c6255f78671c5d518415e985dbf4d6b4 to your computer and use it in GitHub Desktop.
How to configure Bash Completion on Mac for Docker and Docker-Compose

How to configure Bash Completion on Mac for Docker and Docker-Compose

Run:

brew install bash-completion

Add the following lines to your ~/.bash_profile:

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

Run:

curl -L https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose > /usr/local/etc/bash_completion.d/docker-compose
curl -L https://raw.githubusercontent.com/docker/docker/master/contrib/completion/bash/docker > /usr/local/etc/bash_completion.d/docker

Logout/login to your shell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment