tmux -- 禁用上次运行命令的回显? [英] tmux -- disable echo of last run command?
问题描述
我最近开始使用 tmux,除了 tmux 在输出之前打印出我的最后一个运行命令之外,一切都很好,例如:
I started using tmux recently and things are good except for the fact that tmux prints out my last run command before output, e.g.:
~ $ pwd
pwd/Users/me
你可以看到它在那里的目录之前放了pwd",这很烦人.
You can see that it put "pwd" before the directory there, which is annoying.
当我在 tmux 之外运行命令时,我的 shell(zsh) 不会这样做.
My shell(zsh) doesn't do this when I run commands outside of tmux.
show-environment -g 不会显示任何传递给 zsh 或任何东西的奇怪选项:SHELL=/bin/zsh
show-environment -g doesn't reveal any weird options being passed to zsh or anything: SHELL=/bin/zsh
我通读了手册页并用谷歌搜索,但找不到任何东西.
I read through the manpage and Googled around but I can't find anything.
感谢您的帮助!
推荐答案
想通了——需要改变我的 ~/.tmux.conf
以使用不同的 TERM(xterm 而不是 screen-256 色):
Figured it out -- needed to change my ~/.tmux.conf
to have a different TERM(xterm instead of screen-256color):
# act like vim
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind-key -r C-h select-window -t :-
bind-key -r C-l select-window -t :+
# act like GNU screen
unbind C-b
set -g prefix C-a
# look good
#set -g default-terminal "screen-256color"
set -g default-terminal "xterm"
set -g status "off"
这篇关于tmux -- 禁用上次运行命令的回显?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!