2017-11-14 14:36:22 +00:00
|
|
|
function tf_prompt_info() {
|
2018-10-05 18:56:56 +00:00
|
|
|
# dont show 'default' workspace in home dir
|
|
|
|
[[ "$PWD" == ~ ]] && return
|
2017-11-07 15:45:25 +00:00
|
|
|
# check if in terraform dir
|
|
|
|
if [ -d .terraform ]; then
|
|
|
|
workspace=$(terraform workspace show 2> /dev/null) || return
|
|
|
|
echo "[${workspace}]"
|
|
|
|
fi
|
|
|
|
}
|
2020-09-30 08:50:33 +00:00
|
|
|
|
|
|
|
alias tf='terraform'
|