From 8a4999bf8c33d7df58fb9610ca91f10d0ddd224d Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Tue, 19 Mar 2013 14:28:14 -0400 Subject: Make zsh play nice with tmux --- .zshrc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.zshrc b/.zshrc index c3dee24..332d402 100644 --- a/.zshrc +++ b/.zshrc @@ -355,8 +355,10 @@ precmd() { case $TERM in *xterm*|rxvt*) print -Pn "]2;%n@%m:%~\a" ;; - screen*) print -Pn "\"%n@%m:%~\134" - ;; + # Don't execute if we're in TMUX + screen*) + [[ -n ${TMUX} ]] || print -Pn "\"%n@%m:%~\134" + ;; esac } @@ -365,10 +367,10 @@ preexec() { # [[ -t 1 ]] || return case $TERM in *xterm*|rxvt*) - print -Pn "]2;$1\a" - ;; - screen*) - print -Pn "\"$1\134" + print -Pn "]2;$1\a" + ;; + screen*) + [[ -n ${TMUX} ]] || print -Pn "\"$1\134" ;; esac } -- cgit v1.2.3