From 0fed36688f9a60d8b1f2182f27de7fdc8a1e6b72 Mon Sep 17 00:00:00 2001 From: Colin Barnabas <1637663+colin-barnabas@users.noreply.github.com> Date: Fri, 15 Mar 2024 21:26:48 -0700 Subject: fix(docker-compose): completion regression (#12288) --- plugins/docker-compose/_docker-compose | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/docker-compose') diff --git a/plugins/docker-compose/_docker-compose b/plugins/docker-compose/_docker-compose index c6b733500..d0ebfe515 100644 --- a/plugins/docker-compose/_docker-compose +++ b/plugins/docker-compose/_docker-compose @@ -128,7 +128,7 @@ __docker-compose_subcommand() { '--resolve-image-digests[Pin image tags to digests.]' \ '--services[Print the service names, one per line.]' \ '--volumes[Print the volume names, one per line.]' \ - '--hash[Print the service config hash, one per line. Set "service1,service2" for a list of specified services.]' \ && ret=0 + '--hash[Print the service config hash, one per line. Set "service1,service2" for a list of specified services.]' && ret=0 ;; (create) _arguments \ -- cgit v1.2.3-70-g09d2 From 4146c6be217fb3c57c60d74263808f85b1591a0a Mon Sep 17 00:00:00 2001 From: Denis Iskandarov Date: Mon, 15 Jul 2024 20:36:07 +0400 Subject: fix(docker-compose): fix test for `docker-compose` executable (#12555) --- plugins/docker-compose/docker-compose.plugin.zsh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'plugins/docker-compose') diff --git a/plugins/docker-compose/docker-compose.plugin.zsh b/plugins/docker-compose/docker-compose.plugin.zsh index d1823f535..7863c4f39 100644 --- a/plugins/docker-compose/docker-compose.plugin.zsh +++ b/plugins/docker-compose/docker-compose.plugin.zsh @@ -1,5 +1,8 @@ -# support Compose v2 as docker CLI plugin -(( ${+commands[docker-compose]} )) && dccmd='docker-compose' || dccmd='docker compose' +# Support Compose v2 as docker CLI plugin +# +# This tests that the (old) docker-compose command is in $PATH and that +# it resolves to an existing executable file if it's a symlink. +[[ -x "${commands[docker-compose]:A}" ]] && dccmd='docker-compose' || dccmd='docker compose' alias dco="$dccmd" alias dcb="$dccmd build" -- cgit v1.2.3-70-g09d2 From dca16e8f9a20a84172044621a95832b4d5a1e057 Mon Sep 17 00:00:00 2001 From: Fournet Enzo <63660254+enzofrnt@users.noreply.github.com> Date: Wed, 12 Nov 2025 11:42:35 +0100 Subject: docs(docker-compose): clarify tool choice (#13399) --- plugins/docker-compose/README.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins/docker-compose') diff --git a/plugins/docker-compose/README.md b/plugins/docker-compose/README.md index 66d4e0521..5a0290462 100644 --- a/plugins/docker-compose/README.md +++ b/plugins/docker-compose/README.md @@ -2,6 +2,8 @@ This plugin provides completion for [docker-compose](https://docs.docker.com/compose/) as well as some aliases for frequent docker-compose commands. +This plugin chooses automatically between the legacy `docker-compose` command and the modern +`docker compose` subcommand, preferring `docker-compose` when both are available. To use it, add docker-compose to the plugins array of your zshrc file: -- cgit v1.2.3-70-g09d2