Is there a different way to set the 16 terminal colors for git-bash? Ideally, I'd like to know the location of a config file so that editing is easier, and the settings are portable.
It seems the only way I can see so far is to manually edit the boxes from the properties window, but this is buggy and tedious - you can't use hex strings, and selecting the color to inspect it sometimes alters the color wildly.
Since git-bash is an old version of mintty, I tried altering my .bashrc their way, but that failed to work as well. Any hints would be appreciated.
Console colors are stored in the registry under HKCU/Console/[window name]/ColorTable00-15.
[window name] is either "Git Bash" for the start menu entry or something like "C:_Program Files (x86)_Git_git-cheetah_.._bin_sh.exe" for the Windows Explorer context menu entry (supplied by Git-Cheetah).
Alternatively, the registry settings can be overridden by storing an NT_CONSOLE_PROPS structure with appropriate ColorTable settings in the "Git Bash.lnk" shortcut via IShellLinkDataList::AddDataBlock. This happens e.g. if you edit the properties of a console window started via shortcut, or if you edit the shortcut properties directly.
If you want the values from the registry instead, create a new "Git Bash.lnk" shortcut from scratch and leave the Options/Font/Layout/Colors tabs alone.
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