Compare commits

..

1 Commits

Author SHA1 Message Date
sealad886 c2f638ab60
Merge 1b1e6c9546 into 33d4db7fee 2025-01-29 13:59:08 +00:00
1 changed files with 2 additions and 2 deletions

View File

@ -2,9 +2,9 @@ function tf_prompt_info() {
# dont show 'default' workspace in home dir
[[ "$PWD" != ~ ]] || return
# check if in terraform dir and file exists
[[ -d "${TF_DATA_DIR:-.terraform}" && -r "${TF_DATA_DIR:-.terraform}/environment" ]] || return
[[ -d .terraform && -r .terraform/environment ]] || return
local workspace="$(< "${TF_DATA_DIR:-.terraform}/environment")"
local workspace="$(< .terraform/environment)"
echo "${ZSH_THEME_TF_PROMPT_PREFIX-[}${workspace:gs/%/%%}${ZSH_THEME_TF_PROMPT_SUFFIX-]}"
}