tmux — disable echo of last run command?

狂风中的少年 提交于 2019-12-24 01:14:39

问题


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

You can see that it put "pwd" before the directory there, which is annoying.

My shell(zsh) doesn't do this when I run commands outside of tmux.

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.

Thanks for any help!


回答1:


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"


来源:https://stackoverflow.com/questions/9086091/tmux-disable-echo-of-last-run-command

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!