1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-22 05:40:08 +00:00

minikube: cache command completions (#7446)

This commit is contained in:
Pavel Fokin 2020-03-02 14:20:28 +02:00 committed by GitHub
parent e42683b8c5
commit 74420341df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,13 @@
# Autocompletion for Minikube.
#
if (( $+commands[minikube] )); then
__MINICUBE_COMPLETION_FILE="${ZSH_CACHE_DIR}/minicube_completion"
if [ $commands[minikube] ]; then
source <(minikube completion zsh)
if [[ ! -f $__MINICUBE_COMPLETION_FILE ]]; then
minikube completion zsh >! $__MINICUBE_COMPLETION_FILE
fi
[[ -f $__MINICUBE_COMPLETION_FILE ]] && source $__MINICUBE_COMPLETION_FILE
unset __MINICUBE_COMPLETION_FILE
fi