terraform.plugin.zsh 318 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 && -r .terraform/environment ]]; then
  6. workspace=$(cat .terraform/environment) || return
  7. echo "[${workspace}]"
  8. fi
  9. }
  10. alias tf='terraform'