File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Download gcloud to Downloads, extract and then run
2
+ # mv ~/Downloads/google-cloud-sdk /usr/local/bin/
3
+ # after opening a new shell, run to login:
4
+ # gcloud init
5
+
6
+ # The next line updates PATH for the Google Cloud SDK.
7
+ if [ -f ' /usr/local/bin/google-cloud-sdk/path.zsh.inc' ]; then . ' /usr/local/bin/google-cloud-sdk/path.zsh.inc' ; fi
8
+
9
+ # The next line enables shell command completion for gcloud.
10
+ if [ -f ' /usr/local/bin/google-cloud-sdk/completion.zsh.inc' ]; then . ' /usr/local/bin/google-cloud-sdk/completion.zsh.inc' ; fi
11
+
12
+ gcloudPath=` which gcloud`
13
+ function dot_gcloud_version() {
14
+ # gcloud version --format=json
15
+ if [ -f ${gcloudPath} ]; then
16
+ printToolInfo ' gcloud core' $( gcloud version --format=" value(core)" )
17
+ printToolInfo ' gcloud sdk' $( gcloud version --format=' value("Google Cloud SDK")' )
18
+ fi
19
+ }
20
+
21
+ function dot_gcloud_whoami() {
22
+ if [ -f ${gcloudPath} ]; then
23
+ whoami=$( gcloud config get-value account)
24
+ printToolInfo ' gcloud' " $whoami "
25
+ fi
26
+ }
You can’t perform that action at this time.
0 commit comments