From: Bernhard Tittelbach Date: Sat, 23 Jul 2011 16:31:57 +0000 (+0200) Subject: zsh: tmux hardcopy version check X-Git-Tag: v0.4.01~6 X-Git-Url: https://git.grml.org/?a=commitdiff_plain;h=303fb96912e4c6539e8b820b525f8d6b20661a64;p=grml-etc-core.git zsh: tmux hardcopy version check --- diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index a92ffb5..7c92810 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -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