如何让 Emacs shell 模式渲染(或忽略)我的颜色而不是打印 ASCII 代码? [英] How do I get Emacs shell mode to either render (or ignore) my colors instead of printing ASCII codes?

查看:24
本文介绍了如何让 Emacs shell 模式渲染(或忽略)我的颜色而不是打印 ASCII 代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题的症状看起来像[0m[27m[24m[J[34;1"],在终端上转换为蓝色.

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

-A

推荐答案

目前给我一些成功的解决方案是将 shell 函数重新定义为 ansi 术语:

The solution that is currently giving me some success is to redefine the shell function as an ansi term:

;; shell-mode
(defun sh ()
  (interactive)
  (ansi-term "/bin/zsh"))

这篇关于如何让 Emacs shell 模式渲染(或忽略)我的颜色而不是打印 ASCII 代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆