Only source kubectl if it exists

This commit is contained in:
madumlao committed 2021-04-21 16:05:37 +08:00
1 parent 0092e51c81
commit 4b203c2a22
1 file changed
+1 -1
+1 -1
View File
@@ -9,6 +9,6 @@ fi
source "$HOME/.profile"
# source kubernetes shell completion
if [ "$PROFILE_ENABLE_KUBECTL" ]; then
if type kubectl 2> /dev/null && [ "$PROFILE_ENABLE_KUBECTL" ]; then
source <(kubectl completion bash)
fi