I have enabled dircolors to change the ls command to have yellow for folders when using ls. The problem is that when I use the shell in emacs, it still shows them as navy blue which is hard to read on a black background.
How can I change the colors for the bash shell, or more particularly, the ls command. My color changes work on a opened terminal, but not for emacs. I have emacs23 with X support.
Green: Executable or recognized data file. Cyan (Sky Blue): Symbolic link file. Yellow with black background: Device. Magenta (Pink): Graphic image file. Red: Archive file.
1) Configuration file for the ls color command is /etc/DIR_COLORS for Linux. You can modify those colours if you want. 4) You can customized them in /etc/DIR_COLORS or file pointed by shell variable COLORS.
If you are using ansi-color, it take the colors from the ansi-color-names-vector, the default is:
["black" "red" "green" "yellow" "blue" "magenta" "cyan" "white"]
You can customize the colors of the shell output altering the ansi-color-names-vector variable.
Here is mine, work well with zenburn theme.
(setq ansi-color-names-vector
["black" "tomato" "PaleGreen2" "gold1"
"DeepSkyBlue1" "MediumOrchid1" "cyan" "white"])
To see the changes, evaluate the next expresion, and the next out take it in consideration
(setq ansi-color-map (ansi-color-make-color-map))
I hope this helps.
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