summaryrefslogtreecommitdiff
path: root/plugins/terraform/terraform.plugin.zsh
blob: 2c42d394d163cb13103f44110b0f76d750e2b078 (plain)
1
2
3
4
5
6
7
8
9
10
11
function tf_prompt_info() {
    # dont show 'default' workspace in home dir
    [[ "$PWD" == ~ ]] && return
    # check if in terraform dir
    if [ -d .terraform ]; then
      workspace=$(terraform workspace show 2> /dev/null) || return
      echo "[${workspace}]"
    fi
}

alias tf='terraform'