Only source kubectl if it exists

This commit is contained in:
madumlao committed 2021-04-19 08:44:40 +08:00
1 parent 34badb315d
commit a6a1ceeaa3
1 file changed
+1 -1
+1 -1
View File
@@ -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