From 304b8c7a055bd967046bfb921c6311d28448ae80 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sun, 9 Nov 2025 01:48:05 +0330 Subject: [PATCH] simplify regex --- vendor/git-prompt.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vendor/git-prompt.sh b/vendor/git-prompt.sh index 1b67e76..a35b9f9 100644 --- a/vendor/git-prompt.sh +++ b/vendor/git-prompt.sh @@ -5,9 +5,9 @@ function getGitStatusSetting() { # Get all git config entries for the current repository without pager gitConfig=$(git --no-pager config -l 2>/dev/null) || return 0 # treat failure as enabled - # Check if git status for Cmder is disabled - if [[ $gitConfig =~ (^|$'\n')cmder\.status=false($|$'\n') ]] || \ - [[ $gitConfig =~ (^|$'\n')cmder\.shstatus=false($|$'\n') ]] + # Check if git status display for Cmder is disabled via config + # Matches: cmder.status=false or cmder.shstatus=false (Bash-specific) + if [[ $gitConfig =~ (^|$'\n')cmder\.(sh)?status=false($|$'\n') ]] then return 1 # disabled fi