gpt4 book ai didi

configuration - tmux:为什么这两行会在启动时导致 ".tmux.conf:2: can' t 建立当前 session ?

转载 作者:行者123 更新时间:2023-12-04 06:20:31 26 4
gpt4 key购买 nike

我在 ~/.tmux.conf 中只有这两行:

unbind r
bind r source-file ~/.tmux.conf; display "Reloaded"

我只启动了 tmux
tmux


/Users/.../.tmux.conf:2: can't establish current session

是结果。

为什么会这样,我该如何预防?

最佳答案

你在第二个命令中有一个错字;你需要转义分号。参见 man tmux 中的示例:

bind-key R source-file ~/.tmux.conf \; \
    display-message "source-file done"


正如手册继续解释的那样:

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).

关于configuration - tmux:为什么这两行会在启动时导致 ".tmux.conf:2: can' t 建立当前 session ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23166031/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com