mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-12 20:21:02 +01:00
parent
fa770f9678
commit
a9b6af5b23
1 changed files with 12 additions and 12 deletions
|
@ -1,13 +1,13 @@
|
||||||
# Autocompletion for Minikube.
|
if (( ! $+commands[minikube] )); then
|
||||||
#
|
return
|
||||||
if (( $+commands[minikube] )); then
|
|
||||||
__MINIKUBE_COMPLETION_FILE="${ZSH_CACHE_DIR}/minikube_completion"
|
|
||||||
|
|
||||||
if [[ ! -f $__MINIKUBE_COMPLETION_FILE ]]; then
|
|
||||||
minikube completion zsh >! $__MINIKUBE_COMPLETION_FILE
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ -f $__MINIKUBE_COMPLETION_FILE ]] && source $__MINIKUBE_COMPLETION_FILE
|
# If the completion file doesn't exist yet, we need to autoload it and
|
||||||
|
# bind it to `minikube`. Otherwise, compinit will have already done that.
|
||||||
unset __MINIKUBE_COMPLETION_FILE
|
if [[ ! -f "$ZSH_CACHE_DIR/completions/_minikube" ]]; then
|
||||||
|
typeset -g -A _comps
|
||||||
|
autoload -Uz _minikube
|
||||||
|
_comps[minikube]=_minikube
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
minikube completion zsh >| "$ZSH_CACHE_DIR/completions/_minikube" &|
|
||||||
|
|
Loading…
Reference in a new issue