zsh: tmux hardcopy version check
authorBernhard Tittelbach <bernhard@tittelbach.org>
Sat, 23 Jul 2011 16:31:57 +0000 (18:31 +0200)
committerMichael Prokop <mika@grml.org>
Sun, 24 Jul 2011 13:27:07 +0000 (15:27 +0200)
etc/zsh/zshrc

index a92ffb5..7c92810 100644 (file)
@@ -1029,6 +1029,8 @@ if check_com -c screen || check_com -c tmux; then
         # fill array with contents from screen hardcopy
         if ((${+TMUX})); then
             #works, but crashes tmux below version 1.4
+            #luckily tmux -V option to ask for version, was also added in 1.4
+            tmux -V &>/dev/null || return
             tmux -q capture-pane \; save-buffer -b 0 $TMPFILE \; delete-buffer -b 0
         else
             screen -X hardcopy $TMPFILE