make compose plugin detection in bash completion work on Mac OS

Signed-off-by: Vardan Pogosian <vardan.pogosyan@gmail.com>
(cherry picked from commit 77b1031be9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Vardan Pogosian 2022-01-09 12:15:00 +03:00 committed by Sebastiaan van Stijn
parent 613b9362d0
commit c2dcaecf19
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 1 additions and 1 deletions

View File

@ -5485,7 +5485,7 @@ _docker_wait() {
_docker_container_wait
}
COMPOSE_PLUGIN_PATH=$(docker info --format '{{json .ClientInfo.Plugins}}' | sed -n 's/.*"Path":"\([^"]\+docker-compose\)".*/\1/p')
COMPOSE_PLUGIN_PATH=$(docker info --format '{{range .ClientInfo.Plugins}}{{if eq .Name "compose"}}{{.Path}}{{end}}{{end}}')
_docker_compose() {
local completionCommand="__completeNoDesc"