aboutsummaryrefslogtreecommitdiff
path: root/internal/p10k.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'internal/p10k.zsh')
-rwxr-xr-xinternal/p10k.zsh12
1 files changed, 12 insertions, 0 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 7ba7b69d..698a45c6 100755
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -3039,6 +3039,18 @@ function prompt_ranger() {
_p9k_prompt_segment $0 $_p9k_color1 yellow RANGER_ICON 0 '' $RANGER_LEVEL
}
+function prompt_terraform() {
+ (( $+commands[terraform] )) || return
+ local ws=default
+ if [[ -n $TF_WORKSPACE ]]; then
+ ws=$TF_WORKSPACE
+ else
+ local f=${TF_DATA_DIR:-.terraform}/environment
+ [[ -r $f ]] && _p9k_read_file $f && ws=$_p9k_ret
+ fi
+ [[ $ws == default ]] || _p9k_prompt_segment $0 $_p9k_color1 blue TERRAFORM_ICON 0 '' $ws
+}
+
_p9k_preexec() {
if (( $+_p9k_real_zle_rprompt_indent )); then
if [[ -n $_p9k_real_zle_rprompt_indent ]]; then