mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-25 01:47:25 +08:00
Compare commits
No commits in common. "dfa88b4d369f6afc7205af0b399a0ef05a4bef2e" and "875a4553204679cc1e3023a7d0e0bf2cf7d60800" have entirely different histories.
dfa88b4d36
...
875a455320
@ -10,10 +10,8 @@ if [[ -z "${CLOUDSDK_HOME}" ]]; then
|
|||||||
"/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk"
|
"/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk"
|
||||||
"/usr/share/google-cloud-sdk"
|
"/usr/share/google-cloud-sdk"
|
||||||
"/snap/google-cloud-sdk/current"
|
"/snap/google-cloud-sdk/current"
|
||||||
"/usr/lib/google-cloud-sdk"
|
"/usr/lib64/google-cloud-sdk/"
|
||||||
"/usr/lib64/google-cloud-sdk"
|
|
||||||
"/opt/google-cloud-sdk"
|
"/opt/google-cloud-sdk"
|
||||||
"/opt/local/libexec/google-cloud-sdk"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
for gcloud_sdk_location in $search_locations; do
|
for gcloud_sdk_location in $search_locations; do
|
||||||
@ -22,28 +20,15 @@ if [[ -z "${CLOUDSDK_HOME}" ]]; then
|
|||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
unset search_locations gcloud_sdk_location
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (( ${+CLOUDSDK_HOME} )); then
|
if (( ${+CLOUDSDK_HOME} )); then
|
||||||
# Only source this if gcloud isn't already on the path
|
|
||||||
if (( ! $+commands[gcloud] )); then
|
if (( ! $+commands[gcloud] )); then
|
||||||
|
# Only source this if GCloud isn't already on the path
|
||||||
if [[ -f "${CLOUDSDK_HOME}/path.zsh.inc" ]]; then
|
if [[ -f "${CLOUDSDK_HOME}/path.zsh.inc" ]]; then
|
||||||
source "${CLOUDSDK_HOME}/path.zsh.inc"
|
source "${CLOUDSDK_HOME}/path.zsh.inc"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
source "${CLOUDSDK_HOME}/completion.zsh.inc"
|
||||||
# Look for completion file in different paths
|
|
||||||
for comp_file (
|
|
||||||
"${CLOUDSDK_HOME}/completion.zsh.inc" # default location
|
|
||||||
"/usr/share/google-cloud-sdk/completion.zsh.inc" # apt-based location
|
|
||||||
); do
|
|
||||||
if [[ -f "${comp_file}" ]]; then
|
|
||||||
source "${comp_file}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
unset comp_file
|
|
||||||
|
|
||||||
export CLOUDSDK_HOME
|
export CLOUDSDK_HOME
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user