oh-my-zsh/plugins/terraform/terraform.plugin.zsh

11 lines
323 B
Bash
Raw Normal View History

function tf_prompt_info() {
RESET="%{${reset_color}%}"
# check if in terraform dir
if [ -d .terraform ]; then
workspace=$(terraform workspace show 2> /dev/null) || return
TF_INFO="$RESET%{$fg_bold[blue]%}tf:(%{$fg_bold[magenta]%}$workspace%{$fg_bold[blue]%})$RESET "
echo "$TF_INFO"
fi
}