diff options
author | André Lopes <85288424+agnlopes@users.noreply.github.com> | 2022-11-29 13:35:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-29 13:35:57 +0100 |
commit | 66addc8b45c93f7661a5d8bba93b7b4afcbc23de (patch) | |
tree | 4cfcd425a7b6c899f162de4ece66f5e58d12b7b4 /plugins/skaffold/skaffold.plugin.zsh | |
parent | 1aa58d42a52b8fa39f16ad169fc405f276c36ae5 (diff) | |
download | zsh-66addc8b45c93f7661a5d8bba93b7b4afcbc23de.tar.gz zsh-66addc8b45c93f7661a5d8bba93b7b4afcbc23de.tar.bz2 zsh-66addc8b45c93f7661a5d8bba93b7b4afcbc23de.zip |
feat(skaffold): add completion (#11357)
Diffstat (limited to 'plugins/skaffold/skaffold.plugin.zsh')
-rw-r--r-- | plugins/skaffold/skaffold.plugin.zsh | 14 |
1 files changed, 14 insertions, 0 deletions
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" &| |