summaryrefslogtreecommitdiff
path: root/plugins/gcloud/gcloud.plugin.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/gcloud/gcloud.plugin.zsh')
-rw-r--r--plugins/gcloud/gcloud.plugin.zsh10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/gcloud/gcloud.plugin.zsh b/plugins/gcloud/gcloud.plugin.zsh
index 30f1dba8f..9a4213aaf 100644
--- a/plugins/gcloud/gcloud.plugin.zsh
+++ b/plugins/gcloud/gcloud.plugin.zsh
@@ -6,6 +6,7 @@
if [[ -z "${CLOUDSDK_HOME}" ]]; then
search_locations=(
"$HOME/google-cloud-sdk"
+ "/usr/local/share/google-cloud-sdk"
"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk"
"/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk"
"/usr/share/google-cloud-sdk"
@@ -14,6 +15,7 @@ if [[ -z "${CLOUDSDK_HOME}" ]]; then
"/usr/lib/google-cloud-sdk"
"/usr/lib64/google-cloud-sdk"
"/opt/google-cloud-sdk"
+ "/opt/google-cloud-cli"
"/opt/local/libexec/google-cloud-sdk"
)
@@ -27,11 +29,9 @@ if [[ -z "${CLOUDSDK_HOME}" ]]; then
fi
if (( ${+CLOUDSDK_HOME} )); then
- # Only source this if gcloud isn't already on the path
- if (( ! $+commands[gcloud] )); then
- if [[ -f "${CLOUDSDK_HOME}/path.zsh.inc" ]]; then
- source "${CLOUDSDK_HOME}/path.zsh.inc"
- fi
+ # Source path file
+ if [[ -f "${CLOUDSDK_HOME}/path.zsh.inc" ]]; then
+ source "${CLOUDSDK_HOME}/path.zsh.inc"
fi
# Look for completion file in different paths