diff --git a/plugins/docker-compose/docker-compose.plugin.zsh b/plugins/docker-compose/docker-compose.plugin.zsh index 13985fc82..b8a4b067d 100644 --- a/plugins/docker-compose/docker-compose.plugin.zsh +++ b/plugins/docker-compose/docker-compose.plugin.zsh @@ -1,7 +1,5 @@ # support Compose v2 as docker CLI plugin -DOCKER_CONTEXT=default command docker compose &>/dev/null \ - && dccmd='docker compose' \ - || dccmd='docker-compose' +(( ${+commands[docker-compose]} )) && dccmd='docker-compose' || dccmd='docker compose' alias dco="$dccmd" alias dcb="$dccmd build"