Skip to content

Instantly share code, notes, and snippets.

@epcim
Forked from dwchiang/.zshrc
Created December 6, 2020 11:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save epcim/ffe620e2f68fa705c5defab3a13898ad to your computer and use it in GitHub Desktop.
Save epcim/ffe620e2f68fa705c5defab3a13898ad to your computer and use it in GitHub Desktop.
gcloud with zsh
# The next line updates PATH for the Google Cloud SDK.
source /Users/dwchiang/google-cloud-sdk/path.zsh.inc
# The next line enables zsh completion for gcloud.
source /Users/dwchiang/google-cloud-sdk/completion.zsh.inc
script_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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment