Jan Walraven
DevOps



Menu
Categories:
Posted on

Enable Terraform workspace name in prompt in the same style as git:

$ vim .zshrc

Add the following code:

# Enable terraform workspace name in prompt
PROMPT+='$(tf_prompt_info)'
ZSH_THEME_TF_PROMPT_PREFIX="$FG[046]tf:(%{$fg[red]%}"
ZSH_THEME_TF_PROMPT_SUFFIX="$FG[046])%{$reset_color%} "

Example:

example prompt