Getting 256 colors in Emacs * shell *

My Emacs installation has full color support (displays a list-colors-display). However, Emacs * shell * is apparently capable of handling the main 8 ANSI screens. I have the ones that are being processed in my .emacs:

(autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t) (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) 

Is there a way to increase the number of colors supported in * shell *?

+6
source share
2 answers

To get a 256-color terminal, you must use the appropriate terminal emulator.

Check if your terminal supports this:

  $ infocmp -1 $ TERM |  grep colors
 colors # 8,

For example xterm allow this, but you must set TERM = xterm-256color .

+3
source

If I read the ansi flags / settings setting correctly, this will allow only 8 colors, get rid of them and replace tty-color-mode 256 with this parameter

From:

http://www.gnu.org/software/emacs/elisp/html_node/Font-and-Color-Parameters.html

http://www.gnu.org/software/libtool/manual/emacs/Colors.html

+2
source

Source: https://habr.com/ru/post/893025/


All Articles