Command-line Completion (Compose)
Command-line Completion
Compose comes with command completion for the bash and zsh shell.
Installing Command Completion
Bash
Make sure bash completion is installed. If you use a current Linux in a non-minimal installation, bash completion should be available. On a Mac, install with brew install bash-completion
Place the completion script in /etc/bash_completion.d/
(/usr/local/etc/bash_completion.d/
on a Mac), using e.g.
curl -L https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose
Completion will be available upon next login.
Zsh
Place the completion script in your /