Plugins: Terraform

Expanded Terraform plugin with function that can be used to show workspace name in the zsh prompt
This commit is contained in:
Maciej Lasyk 2017-10-25 13:30:10 +02:00
commit 6c875f8930
2 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,7 @@
function terraform_prompt_info() {
# check if in terraform dir
if [ -d .terraform ]; then
workspace=$(terraform workspace show 2> /dev/null) || return
echo "[${workspace}]"
fi
}