terminal icon indicating copy to clipboard operation
terminal copied to clipboard

Git branch name text color cannot be controlled from properties menu

Open ianHunterClipd opened this issue 6 years ago β€’ 8 comments

Environment

Windows build number: Win32NT 10.0.18363.0 Microsoft Windows NT 10.0.18363.0

Windows Terminal version (if applicable): Ubuntu

Any other software? git

Steps to reproduce

Create a new git repo and initialize or step into an existing git repo. Use git branch to display current working branch

Expected behavior

The branch names for the given repo should be listed, with the current working branch denoted by an asterisk. It would seem that the color of the branch name text should be controlled by the same terminal properties that control the other text colors in the terminal, namely Colors --> Screen Text and Colors --> Popup text

Actual behavior

The branch names are displayed in a single color that is independent of the font color for the terminal. gitBranchColor In the image above, both of my text color settings in the Properties --> Colors window have been set to red, which is reflected in the user input in the terminal. However, the color of the branch name remains black. For light colored backgrounds this is not a problem - I noticed the issue when trying to set the background to Ubuntu's default purple color.

Am I missing something simple? I have been using a custom color palette for the past two years, but earlier this week one of the Windows updates reset my Ubuntu terminal color preferences. After reverting to the colors in this article Ubuntu colors for windows bash the issue was immediately noticeable. Any advice would be greatly appreciated - I'll roll with a lighter color scheme for now but would much prefer my old palette back.

Cheers, Ian

ianHunterClipd avatar Mar 16 '20 20:03 ianHunterClipd

Could you share what the contents of the "Terminal" tab in the console properties shows as well?

zadjii-msft avatar Mar 16 '20 21:03 zadjii-msft

terminalPropertiesUbuntu

ianHunterClipd avatar Mar 16 '20 21:03 ianHunterClipd

git likes to print the current branch name in color index 2 (which is usually green.)

normally:

image

your color scheme:

image

it appears as though you've swapped black and green.

DHowett-MSFT avatar Mar 16 '20 23:03 DHowett-MSFT

Thank you so much!

Is there a reference available that maps each color index to its uses in the terminal? Curious for future changes.

ianHunterClipd avatar Mar 17 '20 04:03 ianHunterClipd

Sure! The canonical meanings of all the color indices are here on Wikipedia for both the classic 16- and xterm 88/256-color palette.

DHowett-MSFT avatar Mar 17 '20 04:03 DHowett-MSFT

Oh, if you're asking for a list of what colors applications typically use for what, I'm afraid that that would be a nigh-unto infinite list and one that might be very difficult to keep up to date :smile:

DHowett-MSFT avatar Mar 17 '20 05:03 DHowett-MSFT

Definitely was asking for something like the latter, but now that it's here the former is certainly a more informative read! Thanks again for your help :+1:

ianHunterClipd avatar Mar 17 '20 05:03 ianHunterClipd

I'm gonna go ahead and also pitch colortool here too, since editing all 16 colors by hand is a MAJOR pain, the kind of pain that colortool was specifically created to fix ☺️

zadjii-msft avatar Mar 17 '20 13:03 zadjii-msft