White color in LS_COLORS with MSYS

695 views Asked by At

I'm using MSYS in a Windows machine. I've configured my LS_COLORS in .profile to color the files in white and folders in green:

LS_COLORS='fi=01;37:no=00:di=01;32'

I've set the text color of the window where msys.bat will be run as green, so whatever I write in the console appears in green. This, however, makes the white color I set for the files be green instead. This means the 37 won't set a white color, but the default text color of the window instead.

Is there a way to make the input appear in green and the files listed with ls appear in white?

1

There are 1 answers

1
Chris Dodd On

You'll need to set one of the colors for the window to be white, and then set LS_COLORS to use that color instead of color 7. Using 3f instead of 37 should give you color 15.

A window has 16 colors set for it, that you can see by selecting properties -> colors by right-clicking on the border. Generally color 0 is the background and color 7 is the foreground (and many programs may assume that) though that can be changed as can the actual colors of any the 16 color codes.