I'm trying to customize the colors for the git info added to the prompt by posh-git, but it's not working. I have the following line in my profile:
$GitPromptSettings.DefaultForeGroundColor = 'Yellow'
And that works, if I change Yellow to Green I see the result right after I reload my profile. But other settings don't seem to work: for example, if I add the following line to my profile
$GitPromptSettings.BranchForegroundColor = 'DarkGreen'
...nothing happens, the branch foreground color stays the way it's declared in GitPrompt.ps1 (Cyan). Same thing with almost all the other GitPromptSettings colors.
I've also tried changing the settings in GitPrompt.ps1 and that didn't work either, except for DefaultForegroundColor, any other change I make to the prompt color settings in that file is ignored. What am I doing wrong?
Note: Setting the ForegroundColor to a color name, other than one of the standard ConsoleColor names, only works on Windows. On Windows, posh-git uses the [System.Drawing.ColorTranslator]::FromHtml(string colorName) method to parse a color name as an HTML color. For a complete list of HTML colors, see this W3Schools page.