From f498f0a3a407a87432f2d158e7c01282c330375e Mon Sep 17 00:00:00 2001 From: viktorbarzin Date: Sat, 22 Aug 2020 13:19:11 +0100 Subject: [PATCH] check if kubectl exists b4 sourcing --- .zshrc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.zshrc b/.zshrc index e998460..26bd06b 100644 --- a/.zshrc +++ b/.zshrc @@ -60,7 +60,7 @@ HIST_STAMPS="dd.mm.yyyy" # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. -plugins=(zsh-syntax-highlighting encode64 gitignore zsh-z) +plugins=(encode64 gitignore zsh-z) source $ZSH/oh-my-zsh.sh # Update PROMPT to include current time @@ -169,4 +169,6 @@ export PATH="/home/viktor/.local/bin:$PATH" compinit # add k8s autocompletion, must be after compinit! -source <(kubectl completion zsh) +if which kubectl >/dev/null 2>/dev/null; then + source <(kubectl completion zsh) +fi