mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-08-14 00:48:39 +02:00
Plugins: Terraform (#6373)
Expanded Terraform plugin with function that can be used to show workspace name in the zsh prompt
This commit is contained in:
committed by
Robby Russell
parent
46062e25cc
commit
d12c2ea4e8
7
plugins/terraform/terraform.plugin.zsh
Normal file
7
plugins/terraform/terraform.plugin.zsh
Normal file
@ -0,0 +1,7 @@
|
||||
function terraform_prompt_info() {
|
||||
# check if in terraform dir
|
||||
if [ -d .terraform ]; then
|
||||
workspace=$(terraform workspace show 2> /dev/null) || return
|
||||
echo "[${workspace}]"
|
||||
fi
|
||||
}
|
Reference in New Issue
Block a user