add tmux check condition

This commit is contained in:
fcying 2019-03-01 15:09:55 +08:00
parent 4e511a561d
commit c44cd578ec

View file

@ -16,7 +16,7 @@ if [ "${TERM%%-*}" = 'linux' ]; then
return 2>/dev/null || exit 0
fi
if [ -n "$TMUX" ]; then
if [[ "$TERM" =~ "^screen.*" && -n "$TMUX" ]]; then
# tell tmux to pass the escape sequences through
# (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324)
printf_template="\033Ptmux;\033\033]4;%d;rgb:%s\007\033\\"