From 8b39648e8607be1041889e9675bafc2e0cc1ffa7 Mon Sep 17 00:00:00 2001 From: Antoine Cotten Date: Thu, 27 Oct 2022 10:12:06 +0200 Subject: [PATCH] sh: Call compdef for all sourced completion scripts This is required for all Zsh completions generated by spf13/cobra above version 1.15.0 (spf13/cobra#1690). --- zsh/zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zsh/zshrc b/zsh/zshrc index 110941e..5170fc8 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -175,9 +175,9 @@ add-zsh-hook precmd _kube_ps1_to_rprompt bindkey -M vicmd "${key_info[Control]}x${key_info[Control]}e" edit-command-line # Commands completion -whence kubectl >/dev/null && . <(kubectl completion zsh) +whence kubectl >/dev/null && . <(kubectl completion zsh) && compdef _kubectl kubectl whence ko >/dev/null && . <(ko completion zsh) && compdef _ko ko -whence limactl >/dev/null && . <(limactl completion zsh) +whence limactl >/dev/null && . <(limactl completion zsh) && compdef _limactl limactl [[ -f "${HOME}/.local/share/nvim/site/pack/packer/start/fzf/shell/completion.zsh" ]] && . "${HOME}/.local/share/nvim/site/pack/packer/start/fzf/shell/completion.zsh" # Aliases