From 5908fa649f86ab0458f34401882b15c74fdb70af Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 6 Oct 2022 19:47:52 +0200 Subject: zshenv, zshrc: more gcloud specific settings --- .zsh/zshenv/99_gcloud | 15 +++++++++++++++ .zsh/zshrc/99_gcloud | 2 ++ 2 files changed, 17 insertions(+) create mode 100644 .zsh/zshenv/99_gcloud diff --git a/.zsh/zshenv/99_gcloud b/.zsh/zshenv/99_gcloud new file mode 100644 index 0000000..add747d --- /dev/null +++ b/.zsh/zshenv/99_gcloud @@ -0,0 +1,15 @@ +# zshenv/99_gcloud +# +# Copyright © 2022 Tobias Klauser +# Released under the terms of the Artistic Licence 2.0 +# +# Source repository: git://git.distanz.ch/dotfiles/zsh.git + +path_append $HOME/google-cloud-sdk/bin + +if [ -x $(which gcloud) ] ; then + export CLOUDSDK_COMPUTE_REGION=europe-west6 + export CLOUDSDK_COMPUTE_ZONE=europe-west6-b +fi + +# vim:ft=zsh diff --git a/.zsh/zshrc/99_gcloud b/.zsh/zshrc/99_gcloud index a548595..9257ef9 100644 --- a/.zsh/zshrc/99_gcloud +++ b/.zsh/zshrc/99_gcloud @@ -7,6 +7,8 @@ if [ -f /usr/share/google-cloud-sdk/completion.zsh.inc ] ; then source /usr/share/google-cloud-sdk/completion.zsh.inc +elif [ -f $HOME/google-cloud-sdk/completion.zsh.inc ] ; then + source $HOME/google-cloud-sdk/completion.zsh.inc fi if [ -x "$(which gke-gcloud-auth-plugin)" ] ; then -- cgit v1.2.3-54-g00ecf