1

I have noticed that some colors in LS_COLORS don't work when running a shell inside M-x-ansi-term in Emacs.

For exmaple;

di 00 94 

is supposed to turn on bold on light blue on directories on LS_COLORS (see a list of the codes here), but ansi-term in Emacs does not show it in color. In fact, only the simple colors listed on that website seem to work under ansi-term in Emacs, while they work perfectly well on my regular gnome terminal.

Is there a way to get ansi-term to recognize the so called extra colors? Where/how can I look up the colors supported by ansi-term in Emacs?

1

How about this command?

M-x ansi-color-for-comint-mode-on
0

ansi-term supports the 8 ANSI colors, using TERM=eterm-color. That gives you basic colors, e.g., as shown in Why dialog doesn't support emacs shell on Debian? (sic).

That 94 is not one of the 8 ANSI colors. It comes (originally) from aixterm, but was widely used because it was implemented in xterm in the late 1990s, as seen in ncurses terminal database entry xterm-16color. dircolors, of course does not use the terminal database...

According to the Emacs wiki on AnsiColor, there is an alternative xterm-colors.el which can support more colors.

According to that page (atomontage/xterm-color), it can support xterm 256-colors. Reading the script, I can see some omissions with respect to xterm, but colors should work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.