diff options
author | Ryan Kavanagh <rak@debian.org> | 2013-03-26 10:26:40 -0400 |
---|---|---|
committer | Ryan Kavanagh <rak@debian.org> | 2013-03-26 10:26:40 -0400 |
commit | 5656ec1fc2b3c8c4a9727f40f9c20b5409745513 (patch) | |
tree | 3e3d72c571304702f8e037b1d63ad2f5623b84d4 | |
parent | Add ssh keys for MIT (diff) |
Fix precmd, prexec in zsh to work with tmux (again)
Diffstat (limited to '')
-rw-r--r-- | .zshrc | 15 |
1 files changed, 3 insertions, 12 deletions
@@ -349,16 +349,11 @@ bindkey '\e[6~' down-history # PageDown # This function sets the window tile to user@host:/workingdir before each # prompt. If you're using screen, it sets the window title (works # wonderfully for 'hardstatus' lines. -# Beware: The two functions below have raw control characters. precmd() { # [[ -t 1 ]] || return case $TERM in - *xterm*|rxvt*) print -Pn "]2;%n@%m:%~\a" + *xterm*|rxvt*|screen*) print -Pn "\e]2;%n@%m:%~\a" ;; - # Don't execute if we're in TMUX - screen*) - [[ -n ${TMUX} ]] || print -Pn "\"%n@%m:%~\134" - ;; esac } @@ -366,12 +361,8 @@ precmd() { preexec() { # [[ -t 1 ]] || return case $TERM in - *xterm*|rxvt*) - print -Pn "]2;$1\a" - ;; - screen*) - [[ -n ${TMUX} ]] || print -Pn "\"$1\134" - ;; + *xterm*|rxvt*|screen*) print -Pn "\e]2;$1\a" + ;; esac } |