diff --git a/dotfiles/zshrc.d/gcloud.zsh b/dotfiles/zshrc.d/gcloud.zsh index ecae97d..febfd38 100755 --- a/dotfiles/zshrc.d/gcloud.zsh +++ b/dotfiles/zshrc.d/gcloud.zsh @@ -2,15 +2,16 @@ GCL=${HOME}/tools/gcloud -if [ ! -d ${GCL} ] ; then - return +if [ -d "${GCL}" ] ; then + # Add bin to path + export PATH="${PATH}:${GCL}/bin" + + # Load completion + source "${GCL}/completion.zsh.inc" +elif [ -f /usr/share/google-cloud-sdk/completion.zsh.inc ] ; then + source /usr/share/google-cloud-sdk/completion.zsh.inc fi -# Add bin to path -export PATH="${PATH}:${GCL}/bin" - -# Load completion -source ${GCL}/completion.zsh.inc which kubectl 2>/dev/null >&2 && \ function kubectl() {