]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix tmux version check
authorArun Prakash Jana <engineerarun@gmail.com>
Wed, 3 Jun 2020 22:11:42 +0000 (03:41 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Wed, 3 Jun 2020 22:11:42 +0000 (03:41 +0530)
plugins/preview-tui

index fe130330423a6a408ca4ebf1e84fead891ba5693..bd9fbd8fcaec8255e1d730a60420756ea2b3121c 100755 (executable)
@@ -106,7 +106,7 @@ if [ "$PREVIEW_MODE" ] ; then
     exit 0
 fi
 
-if [ -e "${TMUX%%,*}" ] && [ "$(tmux -V | cut -c6)" -eq 3 ] ; then
+if [ -e "${TMUX%%,*}" ] && tmux -V | grep -q '[ -][3456789]\.' ; then
     if [ -z "$SPLIT" ] && [ $(($(tput lines) * 2)) -gt "$(tput cols)" ] ; then
         SPLIT='v'
     elif [ "$SPLIT" != 'v' ] ; then