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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With