Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

4
Weird background colors showing up in bash on Windows
Post Body

I've been having a strange issue when using the Ubuntu on Windows bash shell in VSCode. When the terminal starts to use colors, there's a weird background color that goes on until I open up a new terminal. Image showing problem. When calling git status if there was no changes that cause the text to go red or green for staged changes, then the text is regular white on grey, but once the status needs the red or green to show the changes, the blue background starts to appear from then on. This also happens if I have LS_COLORS turned on in my .bashrc so I have it disabled. Any idea why this is happening?

Interestingly, this also happens when using the Hyper Terminal as well. I'd appreciate any insight. I've checked over my .bashrc and .profile but there doesn't seem to be anything modifying colors.

EDIT: Using the native bash terminal does not have the same effect.

EDIT 2: It seems that the terminal for both VSCode and Hyper interpret the color code 39m 'default' as that blue color rather than actual default. By ending my PS1 with \e[37;40m I can force the text to be white on dark background even for input. It will only break when an external program changes it back to the 39m default (such as the git output).

Author
Account Strength
100%
Account Age
10 years
Verified Email
Yes
Verified Flair
No
Total Karma
6,408
Link Karma
1,360
Comment Karma
5,002
Profile updated: 4 days ago
Posts updated: 1 year ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
7 years ago