.tmux.conf 未在 Mac 上阅读但在 Linux 上阅读?
.tmux.conf not being read on Mac but being read on Linux?
我正在尝试简单地将我的 tmux 设置中的前缀键从 C-b
更改为 C-\
在我的 linux 和 Mac OS X 台计算机上,我在 ~/
中有一个名为 .tmux.conf
的文件
文件中的所有设置都应用于我的 linux 系统,但是其中 none 应用于我的 Mac 我想知道是否有人知道为什么会这样是?
这是我的 .tmux.conf
:
# Set colors
set-option -g default-terminal "screen-256color"
# Set reload key to r
# bind r source-file ~/.tmux.conf
# Change prefix
unbind-key C-b
set -g prefix 'C-\'
bind-key 'C-\' send-prefix
# Count sessions start at 1
set -g base-index 1
# Set the title bar
set -g set-titles on
set -g set-titles-string '#(whoami) :: #h :: #(curl ipecho.net/plain;echo)'
# Set status bar
set -g status-utf8 on
set -g status-bg black
set -g status-fg white
set -g status-interval 5
set -g status-left-length 90
set -g status-right-length 60
set -g status-left "#[fg=Green]#(whoami)#[fg=white]::#[fg=blue]#(hostname -s)#[fg=white]::#[fg=yellow]#(curl ipecho.net/plain;echo)"
set -g status-justify left
set -g status-right '#[fg=Cyan]#S #[fg=white]%a %d %b %R'
显然您还没有启动 tmux-server
,是 tmux-server
在启动时读取 ~/.tmux.conf
文件,而不是 tmux
会话。
尝试终止所有 tmux 会话并重新启动 tmux-server
例如
$ tmux kill-server
或者像这样尝试重新加载 ~/.tmux.conf
而无需重新启动服务器
:source-file ~/.tmux.conf
可能配置文件有错误。
我正在尝试简单地将我的 tmux 设置中的前缀键从 C-b
更改为 C-\
在我的 linux 和 Mac OS X 台计算机上,我在 ~/
.tmux.conf
的文件
文件中的所有设置都应用于我的 linux 系统,但是其中 none 应用于我的 Mac 我想知道是否有人知道为什么会这样是?
这是我的 .tmux.conf
:
# Set colors
set-option -g default-terminal "screen-256color"
# Set reload key to r
# bind r source-file ~/.tmux.conf
# Change prefix
unbind-key C-b
set -g prefix 'C-\'
bind-key 'C-\' send-prefix
# Count sessions start at 1
set -g base-index 1
# Set the title bar
set -g set-titles on
set -g set-titles-string '#(whoami) :: #h :: #(curl ipecho.net/plain;echo)'
# Set status bar
set -g status-utf8 on
set -g status-bg black
set -g status-fg white
set -g status-interval 5
set -g status-left-length 90
set -g status-right-length 60
set -g status-left "#[fg=Green]#(whoami)#[fg=white]::#[fg=blue]#(hostname -s)#[fg=white]::#[fg=yellow]#(curl ipecho.net/plain;echo)"
set -g status-justify left
set -g status-right '#[fg=Cyan]#S #[fg=white]%a %d %b %R'
显然您还没有启动 tmux-server
,是 tmux-server
在启动时读取 ~/.tmux.conf
文件,而不是 tmux
会话。
尝试终止所有 tmux 会话并重新启动 tmux-server
例如
$ tmux kill-server
或者像这样尝试重新加载 ~/.tmux.conf
而无需重新启动服务器
:source-file ~/.tmux.conf
可能配置文件有错误。