- Make sure bash completion is installed(It's installed by default in major Linux distributions, and Cygwin).
- Put completion files to
/etc/bash_completion.d/
- docker command: https://github.com/docker/docker-ce/blob/v18.06.0-ce/components/cli/contrib/completion/bash/docker
- docker-compose command: https://github.com/docker/compose/blob/1.23.1/contrib/completion/bash/docker-compose
- docker-machine command: https://github.com/docker/machine/blob/v0.16.0/contrib/completion/bash/docker-machine.bash
Note: the version
part in the URL, such as v18.06.0-ce
, 1.23.1
and v0.16.0
, is subject to changes.