zsh-gcloud-prompt
April 26, 2017 ยท View on GitHub
Show current gcloud config in zsh prompt.
This script is inspired by zsh-kubectl-prompt.

Installation
1. Check out the repository.
$ git clone https://github.com/ocadaruma/zsh-gcloud-prompt.git /path/to/zsh-gcloud-prompt
2. Configure your zsh
Current gcloud config is stored in ZSH_GCLOUD_PROMPT. (in the form of "${active-account}:${active-project}")
For example, add following lines to ~/.zshrc
autoload -Uz colors; colors
source /path/to/zsh-gcloud-prompt/gcloud.zsh
RPROMPT='%{$fg[cyan]%}($ZSH_GCLOUD_PROMPT)%{$reset_color%}'