7

In ~/.tmux.conf, I use this bind-key

bind-key R source-file ~/.tmux.conf; display-message "~/.tmux.conf is reloaded"

but, when I use this tmux create a new session. why ?

Edit

this is the complete file

  • Do you create a new session in your .tmux.conf? It's sometimes recommended, so you can run tmux attach and have a new session created if there is no existing session to attach to. – chepner Jun 20 '12 at 19:58
3

Line 15 of your .tmux.conf, "new bash", starts a new session, with "bash" as the command to run in its first window. "new" is an alias for "new-session".

  • how I can open a new session only the first time ? – juanpablo Jun 21 '12 at 3:44
  • 1
    When you start tmux, if you don't give it any command (either on the command line, or in the configuration file), it defaults to 'new-session'. You can just remove line 15. Then, I suggest starting tmux using tmux a || tmux new. This will attempt to connect to the (first, whatever that means) active session, and if it fails, create a new session. – chepner Jun 21 '12 at 12:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.