I have only these 2 lines in ~/.tmux.conf:
unbind r
bind r source-file ~/.tmux.conf; display "Reloaded"
I start up tmux with just
tmux
And
/Users/.../.tmux.conf:2: can't establish current session
is the result.
Why is this, and how can I prevent it?
You have a typo in the second command; you need to escape the semicolon. See the example in man tmux
:
bind-key R source-file ~/.tmux.conf \; \
display-message "source-file done"
As the manual goes on to explain:
Multiple commands may be specified together as part of a command sequence. Each command should be separated by spaces and a semicolon; commands are executed sequentially from left to right and lines ending with a backslash continue on to the next line, except when escaped by another backslash. A literal semicolon may be included by escaping it with a backslash (for example, when specifying a command sequence to bind-key).
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments