xterm-color& xterm-256color? [英] What is the difference between xterm-color & xterm-256color?

查看:2328
本文介绍了xterm-color& xterm-256color?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试将终端程序设置为使用颜色时,我遇到了xterm-color和xterm-256color这两个选项,也就是说,您可以将TERM环境变量设置为一个。

I've come across both xterm-color and xterm-256color as options when trying to set up my terminal program to use color - i.e. you can set your TERM environment variable to either one.

我想知道是否有人可以描述两者之间的区别?

I was wondering if anyone can describe the difference between the two?

我的ubuntu服务器以及我的mac但没有找到任何。我只能在/ usr / share / terminfo中找到各种二进制文件

I've searched for documentation on my ubuntu server as well as my mac but haven't found any. I've only been able to find various binary files in /usr/share/terminfo

推荐答案

xterm -256color 描述了Xterm支持256种颜色的启用。 xterm-color 描述了支持十六种颜色的Xterm的旧分支。 xterm-color 是不推荐的,因为它描述了一个Xterm的变体,它不太功能,并且你不可能使用。通常你会想使用 xterm xterm-16color xterm-256color

xterm-256color describes Xterm with support for 256 colors enabled. xterm-color describes an older branch of Xterm that supports sixteen colors. xterm-color is not recommended, since it describes a variant of Xterm that’s less functional and that you’re not likely to be using. Usually you’ll want to use xterm, xterm-16color or xterm-256color.

特别地, xterm-256color 是从Mac OS X 10.7 Lion,下一个最好的推荐值是 xterm-16color xterm (其中只描述支持八个ANSI颜色)。在10.7之前, xterm-color 是默认值,因为Terminal不支持推荐的Xterm terminfo值描述的一些关键功能,例如背景颜色擦除(BCE),现代

In particular, xterm-256color is the default for Terminal starting with Mac OS X 10.7 Lion, with the next-best recommended values being xterm-16color or xterm (which only describes support for eight ANSI colors). Prior to 10.7, xterm-color was the default because Terminal didn’t support some critical features described by the recommended Xterm terminfo values, e.g., Background Color Erase (BCE), modern codes for switching main/alternate screens, 256 colors.

有时,人们将 TERM 明确设置为 xterm-color (与推荐的Xterm值相反)禁用功能或解决特定计算机上可用的terminfo值与正在使用的终端仿真器之间的不兼容问题。

Sometimes people explicitly set TERM to xterm-color (as opposed to the recommended Xterm values) to disable functionality or work around incompatibilities between the available terminfo values on a particular computer and the terminal emulator being used.

请注意,技术上Terminal应该有自己最新的terminfo值,它描述了它支持哪些功能,而不是使用Xterm的值,但是:

Note that technically Terminal should have its own up-to-date terminfo values that describe exactly which features it supports, instead of using the values for Xterm, but:


  1. 目前没有最新的版本。 nsterm 表示终端从NeXTSTEP的祖先。有人似乎已经更新 nsterm 最近(过去几年的某个时间),但我不知道是否已经进入ncurses分布,它可能不 c> $ TERM 开头是(<)。或等于) xterm 。因此,有些用户仍然需要了解如何使用推荐的Xterm值与Terminal兼容。

  1. There isn’t one that’s up to date currently. nsterm represents Terminal’s ancestor from NeXTSTEP. Someone apparently has updated nsterm recently (sometime in the past couple of years), but I don’t know whether that has made its way into the ncurses distribution, and it may not be completely up to date with Terminal in 10.7.
  2. A number of programs and shell customization scripts explicitly check whether $TERM starts with (or is equal to) xterm. So some users would still need to know about using the recommended Xterm values with Terminal for compatibility with those.

如果您不熟悉使用terminfo系统,请查看x-man-page:// 5 / terminfo手册页。此外,您可以使用 infocmp 命令查看当前的terminfo设置或比较两个不同的设置,例如 infocmp xterm-color xterm-256color 将显示这两者之间的所有差异。

If you’re not familiar with the terminfo system, take a look at the x-man-page://5/terminfo man page. Also, you can use the infocmp command to view the current terminfo settings or compare two different ones, e.g., infocmp xterm-color xterm-256color will show you all the differences between those two.

这篇关于xterm-color&amp; xterm-256color?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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