2017-11-14 15:36:22 +01:00
|
|
|
function tf_prompt_info() {
|
2018-10-05 20:56:56 +02:00
|
|
|
# dont show 'default' workspace in home dir
|
|
|
|
[[ "$PWD" == ~ ]] && return
|
2017-11-07 16:45:25 +01:00
|
|
|
# check if in terraform dir
|
2021-03-08 10:46:42 +01:00
|
|
|
if [[ -d .terraform && -r .terraform/environment ]]; then
|
|
|
|
workspace=$(cat .terraform/environment) || return
|
2017-11-07 16:45:25 +01:00
|
|
|
echo "[${workspace}]"
|
|
|
|
fi
|
|
|
|
}
|
2020-09-30 10:50:33 +02:00
|
|
|
|
|
|
|
alias tf='terraform'
|