Ok, so in git bash this cmd..
git log --pretty='%C(yellow)%h%Creset %s' --abbrev-commit
gives me a yellow commit id and white subject line, but in powershell (with posh git) I get no yellow commit id (it's the default white).
Why ?
Ok, so in git bash this cmd..
git log --pretty='%C(yellow)%h%Creset %s' --abbrev-commit
gives me a yellow commit id and white subject line, but in powershell (with posh git) I get no yellow commit id (it's the default white).
Why ?
It turns out PowerShell's console renders System.ConsoleColor.DarkYellow
as white:
[Enum]::GetValues([ConsoleColor]) | %{ Write-Host $_ -ForegroundColor $_ }
Using bold yellow
instead, which renders with System.ConsoleColor.Yellow
, works:
git log --pretty='%C(bold yellow)%h%Creset %s' --abbrev-commit
Yellow
not DarkYellow
. –
Epistemic © 2022 - 2024 — McMap. All rights reserved.