From 84336c0a7b7e6ce7780f329ad15f1ed2d3a5c6e3 Mon Sep 17 00:00:00 2001 From: steffen Date: Sat, 24 Jan 2026 14:09:59 +0000 Subject: [PATCH] Honor PS1_GIT for hawolex --- .context.json | 3 ++- dotfiles/ps1/ps1.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.context.json b/.context.json index 5018b21..3a409ab 100644 --- a/.context.json +++ b/.context.json @@ -432,6 +432,7 @@ "On macOS, installer is per-user and sources from .bashrc/.bash_profile.", "Seasonal palettes and contest pack are now documented directly in main.", "README uses images/bash-pallete.png.", - "Git capsule prefers __git_ps1 and falls back to git symbolic-ref/short hash when git-prompt is unavailable or returns empty." + "Git capsule prefers __git_ps1 and falls back to git symbolic-ref/short hash when git-prompt is unavailable or returns empty.", + "Hawolex git capsule enables when PS1_GIT=1 or __PS1_GIT=1." ] } diff --git a/dotfiles/ps1/ps1.sh b/dotfiles/ps1/ps1.sh index fae95c4..c3e5ed8 100644 --- a/dotfiles/ps1/ps1.sh +++ b/dotfiles/ps1/ps1.sh @@ -641,7 +641,8 @@ ${G_Z2_BG}${G_Z2_FG} ${HOST_PART}${PATH_SEP}${G_PATH_FG}${PATH_PART}${G_END_PAD} local H_LEFT_FG="\[\e[38;5;54m\]" local H_RIGHT_FG="\[\e[38;5;31m\]" local H_GIT="" - if [[ "$__PS1_GIT" == "1" ]]; then + local H_GIT_ON="${PS1_GIT:-$__PS1_GIT}" + if [[ "$H_GIT_ON" == "1" ]]; then export GIT_PS1_SHOWDIRTYSTATE=1 export GIT_PS1_SHOWSTASHSTATE=1 export GIT_PS1_SHOWUNTRACKEDFILES=1