How do I get Emacs shell mode to either render (or ignore) my colors instead of printing ASCII codes?

前端 未结 4 1459
逝去的感伤
逝去的感伤 2020-12-31 02:27

The symptom of the problem looks like \"[0m[27m[24m[J[34;1\" which on a terminal translates into the color blue.

-A

4条回答
  •  醉话见心
    2020-12-31 03:08

    For the "ignore" alternative, put something like "alias ls=ls" or "unset LS_COLORS" in your ~/.emacs_{bash,tsch,whatever-your-shell-is-called} file. This file is executed in all subordinate shells created by emacs.

    Emacs sends the new shell the contents of the file ~/.emacs_shellname as input, if it exists, where shellname is the name of the file that the shell was loaded from. For example, if you use bash, the file sent to it is ~/.emacs_bash. If this file is not found, Emacs tries to fallback on ~/.emacs.d/init_shellname.sh.

提交回复
热议问题