emacs剥离了shell中的所有ansi颜色代码 [英] emacs strips away all ansi color codes in shells

查看:383
本文介绍了emacs剥离了shell中的所有ansi颜色代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在OS X上使用emacs 24,有一个奇怪的问题,我看不到任何颜色代码。 Emacs似乎只是忽略它们。我的动机是看到一个C ++项目的cmake,llvm和googletest框架的彩色输出。我想在编译模式下看到颜色,但是它可能足以解决comint或shell模式的显示。

I'm using emacs 24 on OS X and have the strange problem that I'm unable to see any color codes. Emacs seems to just ignore them. My motivation is to see colored output from cmake, llvm and the googletest framework for a C++ project. I'd like to see the colors in compile mode, however it would probably suffice to fix the display for comint or shell modes.

我的问题与许多其他的事实上,我不能看到原始的ansi颜色序列和它们应该产生的颜色。似乎代码只是从输出中删除,但是我找不到哪里。

My problem differs from many others in the fact that I can neither see the raw ansi color sequences nor the colors they should produce. It seems that the codes are just stripped away from the output, but I can't find out where.

我尝试了明显的事情,如

I tried out the obvious things like


  • 需要'ansi-color

  • 转动 ansi-

  • 尝试在shell,eshell,multi-term,ansi-term 中生成任何ansi颜色的输出时,使用color-for-comint模式 li>
  • 将我的TERM设置为各种设置,包括 xterm xterm-color xterm-256color

  • requiring 'ansi-color
  • turning ansi-color-for-comint-mode on
  • unsuccessfully trying to produce any ansi-colored output in either shell, eshell, multi-term, ansi-term
  • setting my TERM to various settings, including xterm, xterm-color, xterm-256color

all to no avail。

all to no avail.

编辑:

我的emacs配置分为我的个人设置 fork 我修改的emacs序曲一些小的设置,主要是添加包

My emacs configuration is divided into my personal settings and a fork of emacs prelude in which I modified some minor settings, mainly adding packages

推荐答案

原来,问题是由 zenburn-主题 1.2。有一个bug,那里的版本1.3(刚刚发布)已经修复了 ansi-color-names-vector 。如果您遇到类似问题,请确保升级您的zenburn版本。

So it turned out that the problem was caused by zenburn-theme 1.2. There was a bug there with the ansi-color-names-vector that's fixed in version 1.3 (released just now). If you're experiencing a similar problem make sure you upgrade your version of zenburn.

这篇关于emacs剥离了shell中的所有ansi颜色代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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