@file{~/.emacs_bash}. If this file is not found, Emacs tries with
@file{~/.emacs.d/init_@var{shellname}.sh}.
+ You can enable colorized output for many commands by customizing the
+variable @code{comint-terminfo-terminal} to the value
+@samp{"dumb-emacs-ansi"} (@pxref{Shell Options}).
+
To specify a coding system for the shell, you can use the command
@kbd{C-x @key{RET} c} immediately before @kbd{M-x shell}. You can
also change the coding system for a running subshell by typing
@vindex system-uses-terminfo
@vindex TERM@r{, environment variable, in sub-shell}
Comint mode sets the @env{TERM} environment variable to a safe default
-value, but this value disables some useful features. For example,
-color is disabled in applications that use @env{TERM} to determine if
-color is supported. Therefore, Emacs provides an option
-@code{comint-terminfo-terminal} to let you choose a terminal with more
-advanced features, as defined in your system's terminfo database.
-Emacs will use this option as the value for @env{TERM} so long as
-@code{system-uses-terminfo} is non-@code{nil}.
+value, but this disables some useful features. For example, colorized
+output is disabled in applications that use @env{TERM} to determine
+whether color is supported. If the terminfo database on your system
+contains a definition for the @samp{"dumb-emacs-ansi"} terminal type (as
+all recent versions of terminfo do), you can enable advanced terminal
+features, including color, by customizing the option
+@code{comint-terminfo-terminal} to @samp{"dumb-emacs-ansi"}. Emacs will
+use @code{comint-terminfo-terminal} as the value for @env{TERM} so long
+as @code{system-uses-terminfo} is non-@code{nil}.
Both @code{comint-terminfo-terminal} and @code{system-uses-terminfo}
can be declared as connection-local variables to adjust these options
:group 'comint)
(defcustom comint-terminfo-terminal "dumb"
- "Value to use for TERM when the system uses terminfo."
- :type 'string
+ "Value to use for TERM when the system uses terminfo.
+If the system's terminfo database contains a definition for the
+\"dumb-emacs-ansi\" terminal (as all recent versions of terminfo do),
+set this to \"dumb-emacs-ansi\" and then some terminfo-aware programs
+will send colorized output when run under Comint."
+ :type '(choice (const "dumb")
+ (const "dumb-emacs-ansi")
+ string)
:group 'comint
:version "26.1")