mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-25 15:20:08 +00:00
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.
This commit is contained in:
parent
e09eb23158
commit
9e14387408
1 changed files with 2 additions and 0 deletions
|
@ -1,4 +1,6 @@
|
||||||
function tf_prompt_info() {
|
function tf_prompt_info() {
|
||||||
|
# dont show 'default' workspace in home dir
|
||||||
|
[[ "$PWD" == ~ ]] && return
|
||||||
# check if in terraform dir
|
# check if in terraform dir
|
||||||
if [ -d .terraform ]; then
|
if [ -d .terraform ]; then
|
||||||
workspace=$(terraform workspace show 2> /dev/null) || return
|
workspace=$(terraform workspace show 2> /dev/null) || return
|
||||||
|
|
Loading…
Reference in a new issue