Base16 颜色在 tmux ssh 下中断
Base16 colors break under tmux ssh
我的所有机器都使用相同的点文件。
在我的本地机器上,当 sshing 到
我的一台机器颜色坏了。颜色通常也可以在 tmux 之外使用 sshing。
一般设置如图所示
由于远程主机上没有 tmux 会话 运行(本地 tmux 运行,其中一个窗格中发生 ssh),因此没有设置 $TMUX
环境变量。
Base16 脚本希望有这样一个标志,以便正确设置 RGB
if [ -n "$TMUX" ]; then
# Tell tmux to pass the escape sequences through
# (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324)
put_template() { printf '3Ptmux;33]4;%d;rgb:%s33\3\' $@; }
put_template_var() { printf '3Ptmux;33]%d;rgb:%s33\3\' $@; }
put_template_custom() { printf '3Ptmux;33]%s%s33\3\' $@; }
elif [ "${TERM%%[-.]*}" = "screen" ]; then
...
当前的解决方法是修复每个脚本中的 if 语句。
我的所有机器都使用相同的点文件。
在我的本地机器上,当 sshing 到 我的一台机器颜色坏了。颜色通常也可以在 tmux 之外使用 sshing。
一般设置如图所示
由于远程主机上没有 tmux 会话 运行(本地 tmux 运行,其中一个窗格中发生 ssh),因此没有设置 $TMUX
环境变量。
Base16 脚本希望有这样一个标志,以便正确设置 RGB
if [ -n "$TMUX" ]; then
# Tell tmux to pass the escape sequences through
# (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324)
put_template() { printf '3Ptmux;33]4;%d;rgb:%s33\3\' $@; }
put_template_var() { printf '3Ptmux;33]%d;rgb:%s33\3\' $@; }
put_template_custom() { printf '3Ptmux;33]%s%s33\3\' $@; }
elif [ "${TERM%%[-.]*}" = "screen" ]; then
...
当前的解决方法是修复每个脚本中的 if 语句。