终端中的红色不起作用

时间:2013-08-30 07:10:10

标签: shell colors terminal command-prompt prompt

我的终端有问题。我无法打印出红色! 在我的.bashrc中,这有效:

export PS1='\t \[\033[01;32m\]\h\[\033[01;34m\] \w\[\033[31m\]$(__git_ps1 "(%s)") \[\033[01;34m\]$\[\033[00m\] '

但是当我在终端直接尝试这个命令时,我得到了一个白色文字:

echo -e "This is red->\e[00;31mRED\e[00m"

当我尝试浅红色时,我得到浅红色:

echo -e "This is light red->\e[01;31mLIGHT_RED\e[00m"

已尝试更改个人资料首选项中的背景/文字颜色。

谢谢,

1 个答案:

答案 0 :(得分:1)

您的终端设置必须有,因为您发送的代码是正确的。我明白了:

enter image description here

我的设置是:

enter image description here

我在KDE4上使用Konsole。