cli
cli copied to clipboard
contrib/completion/zsh doesn't complete compose
Description
docker compose <tab> does nothing with contrib/completion/zsh/_docker. docker completion zsh lists compose subcommands.
The original contrib script was deprecated and archived, but it appears to be manually maintained here. Should it still be considered so?
Original issue: https://github.com/Homebrew/homebrew-core/pull/231793 (Homebrew Docker depends on docker-completion > contrib.)
Related: https://github.com/docker/cli/issues/3955#issuecomment-2338035307
Reproduce
-
brew install docker -
docker compose<tab>
Nothing happens
Expected behavior
List compose subcommands
docker version
Client: Docker Engine - Community
Version: 28.3.3
API version: 1.47 (downgraded from 1.51)
Go version: go1.24.5
Git commit: 980b856816
Built: Wed Jul 16 10:32:48 2025
OS/Arch: darwin/arm64
Context: colima
Server: Docker Engine - Community
Engine:
Version: 27.4.0
API version: 1.47 (minimum version 1.24)
Go version: go1.22.10
Git commit: 92a8393
Built: Sat Dec 7 10:39:01 2024
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: 1.7.24
GitCommit: 88bf19b2105c8b17560993bee28a01ddc2f97182
runc:
Version: 1.2.2
GitCommit: v1.2.2-0-g7cb3632
docker-init:
Version: 0.19.0
GitCommit: de40ad0
docker info
Client: Docker Engine - Community
Version: 28.3.3
Context: colima
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.26.1
Path: /opt/homebrew/lib/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: 2.39.1
Path: /opt/homebrew/lib/docker/cli-plugins/docker-compose
Server:
Containers: 3
Running: 0
Paused: 0
Stopped: 3
Images: 2
Server Version: 27.4.0
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: inactive
Runtimes: runc io.containerd.runc.v2
Default Runtime: runc
Init Binary: docker-init
containerd version: 88bf19b2105c8b17560993bee28a01ddc2f97182
runc version: v1.2.2-0-g7cb3632
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.8.0-50-generic
Operating System: Ubuntu 24.04.1 LTS
OSType: linux
Architecture: aarch64
CPUs: 4
Total Memory: 1.913GiB
Name: colima
ID: ad93ab15-62e4-4f8a-8593-f28415124024
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
Additional Info
No response