summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2022-10-06 19:47:52 +0200
committerTobias Klauser <tklauser@distanz.ch>2022-10-06 19:47:52 +0200
commit5908fa649f86ab0458f34401882b15c74fdb70af (patch)
treec3f9cc3bf5ede3e9e01ad51b9e842763367f865f
parentb0df4279a51ca491d4ea93b271e13f0095a4c100 (diff)
zshenv, zshrc: more gcloud specific settings
-rw-r--r--.zsh/zshenv/99_gcloud15
-rw-r--r--.zsh/zshrc/99_gcloud2
2 files changed, 17 insertions, 0 deletions
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 <tklauser@distanz.ch>
+# 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