title: How to write if statement in .tmux.conf to set different options for different tmux versions?
body: <p>I have a .tmux.conf which I use on different machines with different tmux versions installed.</p>
  
  <p>I want to set different mouse options, depending on the tmux version.
  On one machine I have version <code>2.0</code> on the other <code>2.1</code>.</p>
  
  <p>I do not get his part right</p>
  
  <pre><code>if "[[(( $(tmux -V | cut -c 6-) &lt; 2.1 ))]]" \
    "set -g mode-mouse on;" \
    "set -g mouse-resize-pane on;" \
    "set -g select-pane on;" \
    "set -g select-window on" "set -g mouse on"
  </code></pre>
  
  <p>When I source the file</p>
  
  <p><code>$ tmux source-file .tmux.conf</code></p>
  
  <p>I get this message</p>
  
  <p><code>.tmux.conf:12: unknown command: set -g mouse-resize-pane on</code></p>
  
  <p>The machine where I run it has version <code>2.1</code> so it shouldn't set the four options. </p>
  
  <p>I want to set the four options when running tmux 2.0 or less or the one option when running tmux 2.1.</p>
  
  <p>This bash statement works</p>
  
  <pre><code>$ tmux -V
  tmux 2.1
  $ if [[(( $(tmux -V | cut -c 6-) &lt; 2.1 ))]];then echo $?;else echo $?;fi
  1
  </code></pre>