mirror of
https://github.com/cmderdev/cmder.git
synced 2025-11-09 05:39:03 +08:00
Add end-of-line anchor and explanatory comment to Get-GitStatusSetting regex
Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com>
This commit is contained in:
5
vendor/psmodules/Cmder.ps1
vendored
5
vendor/psmodules/Cmder.ps1
vendored
@@ -190,7 +190,10 @@ function Show-GitStatus {
|
||||
function Get-GitStatusSetting {
|
||||
$gitConfig = git --no-pager config -l 2>$null | Out-String
|
||||
|
||||
if ($gitConfig -match '(?m)^cmder\.(ps)?status=false') {
|
||||
# Check if git status display is disabled via config
|
||||
# Matches: cmder.status=false or cmder.psstatus=false (PowerShell-specific)
|
||||
# Anchored to match complete lines only to avoid false positives
|
||||
if ($gitConfig -match '(?m)^cmder\.(ps)?status=false$') {
|
||||
return $false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user