title: Start tmux with cmus opend through bash script
body: <p>I want to open a new tmux session and window with cmus in it or, if alredy running, attach to it. At <a href="http://wiki.ubuntuusers.de/tmux" rel="nofollow">Ubuntuusers</a> I found this Script that should do it.</p>
  
  <pre><code>1. #!/bin/bash
  2. SESSION=main
  3. tmux="tmux -2 -f tmux.conf"
  4. 
  5. # if the session is already running, just attach to it.
  5. $tmux has-session -t $SESSION
  7. if [ $? -eq 0 ]; then
  8.   echo "Session $SESSION already exists. Attaching."
  9.   sleep 1
  10.  $tmux attach -t $SESSION
  11.  exit 0;
  12.  fi
  </code></pre>
  
  <p>I alredy know that i can do manually it with </p>
  
  <pre><code>tmux new -n music cmus
  </code></pre>
  
  <p>But when I use it in the script I only get the Message </p>
  
  <pre><code>usage: new-session [-d] [-n window-name] [-s session-name] [-t target-session] [-x width] [-y height] [command]
  </code></pre>
  
  <p>I also tried it with new-session, but no change.  I have absolutly no clue whats the problem with the command or the script or both</p>