Unverified Commit 8a6fc5c1 authored by Haltarys's avatar Haltarys Committed by GitHub

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

parent b5be2d39
...@@ -38,7 +38,7 @@ fi ...@@ -38,7 +38,7 @@ fi
{ {
# `docker completion` is only available from 23.0.0 on # `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 is-at-least 23.0.0 $_docker_version; then
# If the completion file doesn't exist yet, we need to autoload it and # 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. # bind it to `docker`. Otherwise, compinit will have already done that.
...@@ -47,6 +47,6 @@ fi ...@@ -47,6 +47,6 @@ fi
autoload -Uz _docker autoload -Uz _docker
_comps[docker]=_docker _comps[docker]=_docker
fi fi
docker completion zsh >| "$ZSH_CACHE_DIR/completions/_docker" command docker completion zsh >| "$ZSH_CACHE_DIR/completions/_docker"
fi fi
} &| } &|
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment