Skip to content

Commit 304b8c7

Browse files
authored
simplify regex
1 parent a0d085f commit 304b8c7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vendor/git-prompt.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ function getGitStatusSetting() {
55
# Get all git config entries for the current repository without pager
66
gitConfig=$(git --no-pager config -l 2>/dev/null) || return 0 # treat failure as enabled
77

8-
# Check if git status for Cmder is disabled
9-
if [[ $gitConfig =~ (^|$'\n')cmder\.status=false($|$'\n') ]] || \
10-
[[ $gitConfig =~ (^|$'\n')cmder\.shstatus=false($|$'\n') ]]
8+
# Check if git status display for Cmder is disabled via config
9+
# Matches: cmder.status=false or cmder.shstatus=false (Bash-specific)
10+
if [[ $gitConfig =~ (^|$'\n')cmder\.(sh)?status=false($|$'\n') ]]
1111
then
1212
return 1 # disabled
1313
fi

0 commit comments

Comments
 (0)