环境:Linux 16.04 LTS, tmux 2.1
当我进入tmux
会话时,我面对的第一个窗口是:
/home/rightx2/.tmux.conf:1: unknown command: assume-paste-time
/home/rightx2/.tmux.conf:2: unknown command: base-index
/home/rightx2/.tmux.conf:3: unknown command: bell-action
/home/rightx2/.tmux.conf:4: unknown command: bell-on-alert
/home/rightx2/.tmux.conf:5: unknown command: default-command
/home/rightx2/.tmux.conf:6: unknown command: default-shell
/home/rightx2/.tmux.conf:7: unknown command: destroy-unattached
/home/rightx2/.tmux.conf:8: unknown command: detach-on-destroy
/home/rightx2/.tmux.conf:9: unknown command: display-panes-active-colour
/home/rightx2/.tmux.conf:10: unknown command: display-panes-colour
/home/rightx2/.tmux.conf:11: unknown command: display-panes-time
/home/rightx2/.tmux.conf:12: unknown command: display-time
/home/rightx2/.tmux.conf:13: unknown command: history-limit
/home/rightx2/.tmux.conf:14: unknown command: lock-after-time
/home/rightx2/.tmux.conf:15: unknown command: lock-command
/home/rightx2/.tmux.conf:16: unknown command: message-command-style
/home/rightx2/.tmux.conf:17: unknown command: message-style
/home/rightx2/.tmux.conf:18: unknown command: mouse
/home/rightx2/.tmux.conf:19: unknown command: mouse-utf8
/home/rightx2/.tmux.conf:20: unknown command: prefix
/home/rightx2/.tmux.conf:21: unknown command: prefix2
/home/rightx2/.tmux.conf:22: unknown command: renumber-windows
/home/rightx2/.tmux.conf:23: unknown command: repeat-time
/home/rightx2/.tmux.conf:24: unknown command: set-remain-on-exit
/home/rightx2/.tmux.conf:25: unknown command: set-titles
/home/rightx2/.tmux.conf:26: unknown command: set-titles-string
/home/rightx2/.tmux.conf:27: unknown command: status
/home/rightx2/.tmux.conf:28: unknown command: status-interval
/home/rightx2/.tmux.conf:29: unknown command: status-justify
/home/rightx2/.tmux.conf:30: unknown command: status-keys
/home/rightx2/.tmux.conf:31: unknown command: status-left
/home/rightx2/.tmux.conf:32: unknown command: status-left-length
/home/rightx2/.tmux.conf:33: unknown command: status-left-style
/home/rightx2/.tmux.conf:34: unknown command: status-position
.
.
.
以下是~/.tmux.conf
:
assume-paste-time 1
base-index 0
bell-action any
bell-on-alert off
default-command ""
default-shell "/bin/bash"
destroy-unattached off
detach-on-destroy on
display-panes-active-colour red
display-panes-colour blue
display-panes-time 1000
display-time 750
history-limit 3000
lock-after-time 0
lock-command "lock -np"
message-command-style fg=yellow,bg=black
message-style fg=black,bg=yellow
mouse off
mouse-utf8 on
prefix C-b
prefix2 <NONE>
renumber-windows off
repeat-time 500
set-remain-on-exit off
set-titles off
set-titles-string "#S:#I:#W - "#T" #{session_alerts}"
status on
status-interval 15
status-justify left
status-keys emacs
status-left "[#S] "
status-left-length 10
status-left-style default
status-position bottom
status-right " "#{=21:pane_title}" %H:%M %d-%b-%y"
status-right-length 40
status-right-style default
status-style fg=black,bg=green
status-utf8 on
update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
visual-activity off
visual-bell off
visual-silence off
word-separators " -_@"
为什么会这样?
答案 0 :(得分:0)
我的猜测是,你的.tmux.conf文件是以下命令的结果;
tmux show -g | cat > ~/.tmux.conf
我在尝试tmux的tmux-ressurrect插件时遇到了同样的问题。 正如提到here;
你需要修复你的tmux.conf你使用的命令不存在或不完整
例如:你应该使用display-panes-color而不是display-panes-active-- color full命令应该是这样的:set-option -g display-panes-active-color colour33
设置选项的命令如下:
set-option [-agoqsuw] [-t target-session | target-window]选项值 (别名:set) 使用-w(相当于set-window-option命令)设置一个窗口选项,即服务器 -s选项,否则为会话选项。如果给出-g,则全局会话或 窗口选项已设置。 -u标志取消设置选项,因此会话继承该选项 从全局选项(或使用-g,将全局选项恢复为默认选项)。
The -o flag prevents setting an option that is already set and the -q flag suppresses errors about unknown or ambiguous options. With -a, and if the option expects a string or a style, value is appended to the existing setting. For example: set -g status-left "foo" set -ag status-left "bar" Will result in ‘foobar’. And: set -g status-style "bg=red" set -ag status-style "fg=blue"
我确实在我的行前面加了一行,似乎除了prefix2 <NONE>
之外它似乎正在工作。
以下您可以找到前置版本。
set-option -g assume-paste-time 1
set-option -g base-index 0
set-option -g bell-action any
set-option -g bell-on-alert off
set-option -g default-command ""
set-option -g default-shell "/bin/bash"
set-option -g destroy-unattached off
set-option -g detach-on-destroy on
set-option -g display-panes-active-colour red
set-option -g display-panes-colour blue
set-option -g display-panes-time 1000
set-option -g display-time 750
set-option -g history-limit 2000
set-option -g lock-after-time 0
set-option -g lock-command "lock -np"
set-option -g message-command-style fg=yellow,bg=black
set-option -g message-style fg=black,bg=yellow
set-option -g mouse off
set-option -g mouse-utf8 on
set-option -g prefix C-b
set-option -g prefix2 <NONE>
set-option -g renumber-windows off
set-option -g repeat-time 500
set-option -g set-remain-on-exit off
set-option -g set-titles off
set-option -g set-titles-string "#S:#I:#W - "#T" #{session_alerts}"
set-option -g status on
set-option -g status-interval 15
set-option -g status-justify left
set-option -g status-keys emacs
set-option -g status-left "[#S] "
set-option -g status-left-length 10
set-option -g status-left-style default
set-option -g status-position bottom
set-option -g status-right " "#{=21:pane_title}" %H:%M %d-%b-%y"
set-option -g status-right-length 40
set-option -g status-right-style default
set-option -g status-style fg=black,bg=green
set-option -g status-utf8 on
set-option -g update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-option -g word-separators " -_@"
~~~
历史限制线
设置窗口历史记录中保留的最大行数。此设置仅适用于新窗口 - 现有窗口历史记录未调整大小并在创建时保留限制。
对于回滚尺寸,我认为已经有了nice answer。