[英]Tig doesn't display colors at all
I'm trying to work with tig to see git database. 我正在尝试使用tig来查看git数据库。 But it doesn't display colors at all. 但是它根本不显示颜色。 If I try to set a color in ~/.tigrc it just ignores it. 如果我尝试在〜/ .tigrc中设置颜色,它将忽略它。 I added a binding and it works, so tig do see my tigrc file. 我添加了绑定,它可以工作,因此tig确实可以看到我的tigrc文件。
Can any one help me please? 有人可以帮我吗?
In general, command line applications rely on the value of your $TERM
environment variable to determine whether your system supports coloured output. 通常,命令行应用程序依靠$TERM
环境变量的值来确定系统是否支持彩色输出。 A setting of vt100
like you have does not indicate colour support. 像您这样的vt100
设置并不表示支持颜色。
There are many possible settings for this variable, though a common "base" setting that supports 16 colours is xterm
. 尽管xterm
是支持16种颜色的通用“基本”设置,但此变量有许多可能的设置。 The way to change this setting will depend on your shell, but in Bash you can try this: 更改此设置的方法取决于您的shell,但是在Bash中,您可以尝试以下操作:
# Set the new value for the current session
export TERM=xterm
# Now test tig...
# If successful, add to your .bashrc for future sessions
echo export TERM=xterm >> ~/.bashrc
This section from the GNU gettext manpage that discusses some other possible settings for the $TERM
variable. GNU gettext手册页的这一部分讨论了$TERM
变量的其他一些可能的设置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.