From a6a1ceeaa36d6bd7e0c0b9cb4b76bd648f66ef01 Mon Sep 17 00:00:00 2001 From: madumlao Date: Mon, 19 Apr 2021 08:44:40 +0800 Subject: [PATCH] Only source kubectl if it exists --- skel/.zprofile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skel/.zprofile b/skel/.zprofile index cee8ebf..953144e 100644 --- a/skel/.zprofile +++ b/skel/.zprofile @@ -2,6 +2,6 @@ source /etc/profile source $HOME/.profile # source kubernetes shell completion -if [ "$PROFILE_ENABLE_KUBECTL" ]; then +if whence kubectl > /dev/null && [ "$PROFILE_ENABLE_KUBECTL" ]; then source <(kubectl completion zsh) fi