如何重新加载 TMUX 配置?

tim*_*one 15 tmux

尝试在 OS X 10.7 上转换到 tmux(1.6 版)(所以我确定我犯了一个菜鸟错误)并且在使用最简单的命令时遇到问题。在我的 ~/.tmux.conf 中,我必须将前缀映射到 Ctrl-a 而不是:

set -g prefix C-a
Run Code Online (Sandbox Code Playgroud)

但是当我:

Wed Apr 10$ source ~/.tmux.conf                                                       ?                                                                                      
-bash: set: -g: invalid option                                                        ?                                                                                      
set: usage: set [--abefhkmnptuvxBCHP] [-o option] [arg ...]                           ?                                                                                      
Wed Apr 10$ 
Run Code Online (Sandbox Code Playgroud)

我收到无效选项错误。这只是一个语法问题还是可能存在其他一些配置问题?我将如何解决这个问题?

use*_*686 30

tmux.conftmux的配置文件。你不应该在你的shell 中获取它,而是告诉 tmux 获取它。

以下任何一项都应该有效:

  • tmux source ~/.tmux.conf

  • tmux set -g prefix C-a

  • 按旧前缀 ( CtrlB),:source ~/.tmux.conf

  • 按旧前缀 ( CtrlB),:set -g prefix C-a