tay*_*lor 12 macos terminal zsh tmux iterm2
首先:我在 OS X 10.12 上的 iTerm 2 中使用通过自制程序安装的 tmux 2.5(尽管问题也出现在 Terminal.app 中)。我的 tmux.conf和zshrc都在 Github 上。
问题:似乎不知从何而来,我开始在输入提示时发现问题。键入一次按键将显示它们两次,退格键将向前移动光标并重新绘制该行中已存在的字符。这仅发生在 tmux 会话内,而不是在我的“常规”终端内。
这是这个问题的 gif。在此 gif 中,我输入1234567890,然后按退格键 9 次,然后输入ls。请注意,0仅显示一次,并且lls重复l运行该ls命令按预期。
希望我只是偶然按下了一个奇怪的组合键,但我已经坚持了一段时间了。
谢谢你的帮助!
按照本指南中的说明安装tmux-256colormacOS即可解决该问题。
运行 github问题中提到的以下命令解决了我的问题:
brew install ncurses
$(brew --prefix)/opt/ncurses/bin/infocmp tmux-256color > ~/tmux-256color.info
tic -xe tmux-256color tmux-256color.info
infocmp tmux-256color | head
Run Code Online (Sandbox Code Playgroud)
从我的注释掉这一行后,问题似乎得到了解决tmux.conf:
set -g default-command "reattach-to-user-namespace -l zsh"
I also had to manually run tmux kill-server instead of relying on just re-sourcing my conf file.
When I find some time, I'll look more into what went wrong here...
| 归档时间: |
|
| 查看次数: |
4256 次 |
| 最近记录: |