Verified Production Fix
[docker/cli] contrib/completion/zsh doesn't complete compose
GH-docker/cli#6231 • Mar 07, 2026
### ROOT CAUSE
The `contrib/completion/zsh/_docker` file does not handle the `compose` command properly. The completion function lacks a case statement for `compose`, preventing subcommand completion.
### CODE FIX
Update the Zsh completion function to include the `compose` command and its subcommands.
zsh
# In contrib/completion/zsh/_docker, add:
compose) {
_docker_compose_COMPLETE=($(_docker_compose "$1"))
return 0
}
This adds a case for `compose`, enabling subcommand completion when `docker compose` is used.
Deploy with Vultr
Use this fix in production instantly. Claim your high-performance developer credit.
Get Started with Vultr →
digital