title: Enabling mouse support across different tmux versions
body: <p>I manage several Linux machines, some with tmux version 2.1 in the repositories, and others with tmux versions less than 2.1. I use mouse mode, and I understand that in tmux 2.1, the option to enable mouse mode has changed to:</p>
  
  <pre><code>set -g mouse on
  </code></pre>
  
  <p>Since I use different distributions each with a different version of tmux, I wanted to make one .tmux.conf file that would enable the appropriate mouse option depending on the version. </p>
  
  <p>So, I added the following to my .tmux.conf:</p>
  
  <pre><code># Mouse Mode
  if-shell "[[ `tmux -V |cut -d ' ' -f2` -ge 2.1 ]]" 'set -g mouse on'
  if-shell "[[ `tmux -V |cut -d ' ' -f2` -lt 2.0 ]]" 'set -g mode-mouse on'
  if-shell "[[ `tmux -V |cut -d ' ' -f2` -lt 2.0 ]]" 'set -g mouse-resize-pane on'
  if-shell "[[ `tmux -V |cut -d ' ' -f2` -lt 2.0 ]]" 'set -g mouse-select-pane on'
  if-shell "[[ `tmux -V |cut -d ' ' -f2` -lt 2.0 ]]" 'set -g mouse-select-window on'
  </code></pre>
  
  <p>Unfortunately, this does not work. tmux doesn't show any errors, but it also doesn't enable mouse mode either.</p>
  
  <p>Is there some error in my logic which is preventing this configuration from working?</p>