From 9e14387408fd83be63ac5158f4671944ca9bad14 Mon Sep 17 00:00:00 2001 From: Tristan Escalada Date: Fri, 5 Oct 2018 14:56:56 -0400 Subject: [PATCH] terraform: disable terraform prompt in $HOME (#7227) In the home directory there is a .terraform folder for modules but it is most likely not an actual directory of terraform scripts. Therefore, this patch disables checking for workspace in the home directory. --- plugins/terraform/terraform.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/terraform/terraform.plugin.zsh b/plugins/terraform/terraform.plugin.zsh index b170f73a6..d727c1ee0 100644 --- a/plugins/terraform/terraform.plugin.zsh +++ b/plugins/terraform/terraform.plugin.zsh @@ -1,4 +1,6 @@ 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