iTerm2默认也没有颜色,export CLICOLOR=1之后有了颜色,凑合着也就用了。
但是ssh到远程机器之后颜色又消失了。请问要如何配置?
搜索到的一些方法也试过了,毫无效果。
但是ssh到远程机器之后颜色又消失了。请问要如何配置?
搜索到的一些方法也试过了,毫无效果。
1
jsfaint Jan 12, 2015
没有颜色是你远端的机器的设置问题啊
请自行alias ls="ls --clolor" |
3
NemoAlex Jan 12, 2015
export CLICOLOR="xterm-color"
export LSCOLORS="gxfxcxdxbxegedabagacad" |
4
lululau Jan 12, 2015
很有可能和 terminal type 有关
echo $TERM |
6
lululau Jan 12, 2015
@fasling 你用 xshell 连接到 remote host, 在 remost host 上执行 echo $TERM,假设输出为 abc, 那么然后在 iTerm2 里执行:
TERM=abc ssh username@remote_host |
7
lululau Jan 12, 2015 我记得有的发行版里有类似这样的判断:
if [ "$TERM" = xterm ] then alias ls='ls --color' fi |