tmux: why do these two lines cause a ".tmux.conf:2: can't establish current session" on startup?

dmonopoly

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?

jasonwryan

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.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

tmux: why do these two lines cause a ".tmux.conf:2: can't establish current session" on startup?

From Dev

django-pipeline: Why do these JS lines cause yui-compressor to crash?

From Dev

Why do Arabic text breaks into two lines sometimes?

From Dev

How do run my script inside tmux on server startup

From Dev

How do I change the color of the pane dividing lines in tmux?

From Dev

wsgi startup - why two identical processes?

From Dev

Tmux [exited] on startup

From Dev

Tmux [exited] on startup

From Dev

how to do a li with two lines?

From Dev

Why do looped describe blocks cause failures?

From Dev

Why do list initialization cause a Seg fault?

From Dev

Why do strace and ltrace cause EINTR to happen?

From Dev

Tmux - select entire lines

From Dev

Why is there a difference between the following two lines of code?

From Dev

Tmux - Execute command in session on startup

From Dev

Why does working with two ManualResetEvents cause a deadlock here?

From Java

How do I swap two lines in vim?

From Dev

How do I join two lines in PowerShell

From Dev

Why do people set their tmux prefix to ctrl-a

From Dev

Why do Vim colors look different inside and outside of tmux?

From Dev

Why do people set their tmux prefix to ctrl-a

From Dev

Why do gray lines appear around the paths?

From Dev

Why do cat and more wrap lines differently?

From Dev

Why do global variables cause trouble for compiler optimizations in function calls?

From Dev

Why do deleted move semantics cause problems with std::vector?

From Dev

why do nested parentheses cause empty strings in this regex?

From Dev

Why do bash parameter expansions cause an rsync command to operate differently?

From Dev

Why do very large If statements cause a stack overflow

From Dev

Why do circular imports cause problems with object identity using `isinstance`?

Related Related

  1. 1

    tmux: why do these two lines cause a ".tmux.conf:2: can't establish current session" on startup?

  2. 2

    django-pipeline: Why do these JS lines cause yui-compressor to crash?

  3. 3

    Why do Arabic text breaks into two lines sometimes?

  4. 4

    How do run my script inside tmux on server startup

  5. 5

    How do I change the color of the pane dividing lines in tmux?

  6. 6

    wsgi startup - why two identical processes?

  7. 7

    Tmux [exited] on startup

  8. 8

    Tmux [exited] on startup

  9. 9

    how to do a li with two lines?

  10. 10

    Why do looped describe blocks cause failures?

  11. 11

    Why do list initialization cause a Seg fault?

  12. 12

    Why do strace and ltrace cause EINTR to happen?

  13. 13

    Tmux - select entire lines

  14. 14

    Why is there a difference between the following two lines of code?

  15. 15

    Tmux - Execute command in session on startup

  16. 16

    Why does working with two ManualResetEvents cause a deadlock here?

  17. 17

    How do I swap two lines in vim?

  18. 18

    How do I join two lines in PowerShell

  19. 19

    Why do people set their tmux prefix to ctrl-a

  20. 20

    Why do Vim colors look different inside and outside of tmux?

  21. 21

    Why do people set their tmux prefix to ctrl-a

  22. 22

    Why do gray lines appear around the paths?

  23. 23

    Why do cat and more wrap lines differently?

  24. 24

    Why do global variables cause trouble for compiler optimizations in function calls?

  25. 25

    Why do deleted move semantics cause problems with std::vector?

  26. 26

    why do nested parentheses cause empty strings in this regex?

  27. 27

    Why do bash parameter expansions cause an rsync command to operate differently?

  28. 28

    Why do very large If statements cause a stack overflow

  29. 29

    Why do circular imports cause problems with object identity using `isinstance`?

HotTag

Archive