1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-12-18 10:22:00 +00:00

fix(docker): use command docker (#11766)

This commit is contained in:
Haltarys 2023-06-20 22:27:14 +02:00 committed by GitHub
parent b5be2d39e2
commit 8a6fc5c16d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,7 +38,7 @@ fi
{
# `docker completion` is only available from 23.0.0 on
local _docker_version=$(docker version --format '{{.Client.Version}}' 2>/dev/null)
local _docker_version=$(command docker version --format '{{.Client.Version}}' 2>/dev/null)
if is-at-least 23.0.0 $_docker_version; then
# If the completion file doesn't exist yet, we need to autoload it and
# bind it to `docker`. Otherwise, compinit will have already done that.
@ -47,6 +47,6 @@ fi
autoload -Uz _docker
_comps[docker]=_docker
fi
docker completion zsh >| "$ZSH_CACHE_DIR/completions/_docker"
command docker completion zsh >| "$ZSH_CACHE_DIR/completions/_docker"
fi
} &|