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.
Diff
1diff --git a/plugins/terraform/terraform.plugin.zsh b/plugins/terraform/terraform.plugin.zsh
2index b170f73a640f279dbdd99de9afa77bbb49d6ab5d..d727c1ee0062a5e9c2b57f888bee583a93e5cd27 100644
3--- a/plugins/terraform/terraform.plugin.zsh
4+++ b/plugins/terraform/terraform.plugin.zsh
5@@ -1,4 +1,6 @@
6 function tf_prompt_info() {
7+ # dont show 'default' workspace in home dir
8+ [[ "$PWD" == ~ ]] && return
9 # check if in terraform dir
10 if [ -d .terraform ]; then
11 workspace=$(terraform workspace show 2> /dev/null) || return