From 74f57b9ecf5c46506902a81220f8cb4dec3d67bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20P=C5=82azie=C5=84ski?= Date: Tue, 31 Dec 2019 08:50:36 +0100 Subject: [PATCH] Optionally load kubernetes completions --- zshrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zshrc b/zshrc index 8188da3..357fcb7 100644 --- a/zshrc +++ b/zshrc @@ -670,4 +670,9 @@ store_last_return_value() { # This must be exactly first precmd function, because other precmd might modify $? precmd_functions=(store_last_return_value $precmd_functions) +# If kubectl is present, load completions from it. +# This must be done after compinit was called +if [[ $commands[kubectl] ]]; then + source <(kubectl completion zsh); +fi