terraform.plugin.zsh 297 B

1234567891011
  1. function tf_prompt_info() {
  2. # dont show 'default' workspace in home dir
  3. [[ "$PWD" == ~ ]] && return
  4. # check if in terraform dir
  5. if [ -d .terraform ]; then
  6. workspace=$(terraform workspace show 2> /dev/null) || return
  7. echo "[${workspace}]"
  8. fi
  9. }
  10. alias tf='terraform'