From 66addc8b45c93f7661a5d8bba93b7b4afcbc23de Mon Sep 17 00:00:00 2001 From: André Lopes <85288424+agnlopes@users.noreply.github.com> Date: Tue, 29 Nov 2022 13:35:57 +0100 Subject: feat(skaffold): add completion (#11357) --- plugins/skaffold/skaffold.plugin.zsh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 plugins/skaffold/skaffold.plugin.zsh (limited to 'plugins/skaffold/skaffold.plugin.zsh') diff --git a/plugins/skaffold/skaffold.plugin.zsh b/plugins/skaffold/skaffold.plugin.zsh new file mode 100644 index 000000000..8296c450c --- /dev/null +++ b/plugins/skaffold/skaffold.plugin.zsh @@ -0,0 +1,14 @@ +# Autocompletion for skaffold +if (( ! $+commands[skaffold] )); then + return +fi + +# If the completion file doesn't exist yet, we need to autoload it and +# bind it to `skaffold`. Otherwise, compinit will have already done that. +if [[ ! -f "$ZSH_CACHE_DIR/completions/_skaffold" ]]; then + typeset -g -A _comps + autoload -Uz _skaffold + _comps[skaffold]=_skaffold +fi + +skaffold completion zsh >| "$ZSH_CACHE_DIR/completions/_skaffold" &| -- cgit v1.2.3-70-g09d2