I am on a mac and am trying to install the Google Cloud SDK (including the gcloud command line utility) using this command in terminal
curl https://sdk.cloud
Using .zsh shell
you can just try to add glcoud
in plugin list in the ~/.zshrc
file.
plugins=(
gcloud
)
If that doesn't work, try this: (updated Krishna's answer)
~/.zshrc
file# Updates PATH for the Google Cloud SDK.
source /Users/austris/google-cloud-sdk/path.zsh.inc
# Enables zsh completion for gcloud.
source /Users/austris/google-cloud-sdk/completion.zsh.inc
google-cloud-sdk/path.zsh.inc
file with followingscript_link="$( readlink "$0" )" || script_link="$0"
apparent_sdk_dir="${script_link%/*}"
if [[ "$apparent_sdk_dir" == "$script_link" ]]; then
apparent_sdk_dir=.
fi
sdk_dir="$( cd -P "$apparent_sdk_dir" && pwd -P )"
bin_path="$sdk_dir/bin"
export PATH=$bin_path:$PATH
*double square brackets at the third line were missing from the original answer