Why there is no yellow in powershell and posh git

Ok, so in git bash this cmd ..

git log --pretty='%C(yellow)%h%Creset %s' --abbrev-commit 

gives me a yellow commit id and a line with a white plot, but in powershell (with posh git) I don't get a yellow commit id (it is white by default).

Why?

+8
git powershell posh-git
source share
1 answer

It turns out the PowerShell console displays System.ConsoleColor.DarkYellow as white:

 [Enum]::GetValues([ConsoleColor]) | %{ Write-Host $_ -ForegroundColor $_ } 

Using bold yellow instead, which does using System.ConsoleColor.Yellow , works:

 git log --pretty='%C(bold yellow)%h%Creset %s' --abbrev-commit 
+9
source share

All Articles