I followed https://unix.stackexchange.com/a/94508/674 to change the colors used by ls
. This works in bash.
When I open a buffer of "Shell" mode in Emacs (M-x shell), the change doesn't work. I wonder how I can apply the same change to Emacs "Shell" mode?
Best Answer
Some versions of
ls
need to know from the terminfo database what color codes are supported by the terminal.First, create the following file (dumb-emacs-ansi.ti):
This is a Terminfo entry I created with support for Emacs' own brand of ANSI codes (supports only 8 colors, has bold, italic and underline as independent attributes). Compile it with
tic dumb-emacs-ansi.ti
.Then add to your .bashrc:
You can just run the export line in your existing shell session to update it without restarting bash.