forked from extern/ohmyzsh
fix(docker): use command docker
(#11766)
This commit is contained in:
parent
b5be2d39e2
commit
8a6fc5c16d
@ -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
|
||||
} &|
|
||||
|
Loading…
Reference in New Issue
Block a user