zsh: tmux hardcopy version check
[grml-etc-core.git] / 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