aboutsummaryrefslogtreecommitdiff
path: root/.zshrc
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@debian.org>2013-03-19 14:28:14 -0400
committerRyan Kavanagh <rak@debian.org>2013-03-19 14:31:37 -0400
commit8a4999bf8c33d7df58fb9610ca91f10d0ddd224d (patch)
tree24d588e1936091255fae0564fcbe7b50918f6d31 /.zshrc
parentMake awk script generating msmtp aliases in Makefile portable (diff)
Make zsh play nice with tmux
Diffstat (limited to '')
-rw-r--r--.zshrc14
1 files 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
}