tmux - 在第一次会话中,tmux 说“没有当前会话”
问题描述
每当我第一次打开 tmux 时,它都会引发以下错误。
/home/user/.tmux.conf:67: no current window
conf文件的相关部分如下。
52 set-window-option -g window-status-fg "#666666"
53 set-window-option -g window-status-bg default
54 set-window-option -g window-status-attr default
55 set-window-option -g window-status-current-fg red
56 set-window-option -g window-status-current-bg default
57 set-window-option -g window-status-current-attr default
58 set-option -g message-fg white
59 set-option -g message-bg black
60 set-option -g message-attr bright
61 set -g status-left " "
62 set -g status-justify left
63 setw -g window-status-format ' #(echo "[#{window_index}]#{window_name}") '
64 #setw -g window-status-current-format ' #(echo "[#{window_index}]#{window_name}") '
65 setw -g window-status-current-format ' #(echo "#{window_name}") '
66 set -g status-right "#(echo $(date))"
67 set allow-rename off
68 set -sg escape-time 0
此错误仅在我打开的第一个会话中出现,对于后续会话,该错误不会出现。
解决方案
您在该 set 命令上没有 -g,因此它需要一个窗口来设置选项,但尚不存在任何窗口。
推荐阅读
- ios - Apple Music API,“电台”资源类型播放
- python - 我想知道是否有办法摆脱 Tkitner 小部件上的白色背景,使其透明
- python - Python ValueError:两个日期必须与 .loc 具有相同的 UTC 偏移量
- esp32 - Micropython - 最大十进制数(esp32)?
- python - 如何处理 UnicodeDecodeError
- csv - PySpark - 读取带有引号的 csv 文件
- python-3.x - 通过正则表达式拆分文件内容
- javascript - ipfs文件上传问题
- scala.js - 无法让香蕉 rdf 与 scalajs 一起使用
- reactjs - 如何让 onClick 在我的嵌套 React 组件中工作?