通常,tmux
只会显示与终端当前显示的行数一样多的输出。然后当我分离它时,它会清除它的所有内容。我知道如何查看回滚(ctrl+A
、[
、k
等),但是我如何配置tmux,使其只将其所有输出打印到终端,就好像我根本没有使用它一样?
我喜欢tmux
,因为我不擅长记住nohup
某些任务,而且它使查看长时间运行的作业的输出变得更容易。但我希望能够更自然地查看它的回滚,只需在iTerm2中回滚即可。
或者,如果在screen
中可以做到这一点,我也可以使用它。
发布于 2013-03-10 09:20:04
iTerm2 build 1.0.0.20130302有一个首选项,即使存在所谓的硬状态行,它也可以捕获回滚:
适用于我,使用tmux
v1.8进行了测试。
发布于 2013-05-13 00:20:36
我在Superuser.com上偶然发现了另一个解决方案:Use terminal scrollbar with tmux。将此代码添加到您的~/.tmux.conf
# Pretend our terminal doesn't support alternative screens, and thus all text
# should be placed into the scrollback buffer when it goes off the top of the
# screen.
#
# https://superuser.com/questions/310251/use-terminal-scrollbar-with-tmux
set-option -ga terminal-overrides ',xterm*:smcup@:rmcup@'
适用于我的gnome-terminal
v3.4.1.1和tmux
v1.9
发布于 2015-08-28 19:00:15
将此代码添加到您的~/.tmux.conf
中,然后只需滚动即可进入复制模式:
setw -g mode-mouse on
您可能还想启用其他鼠标功能:
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window on
查看这些特性的优秀文章:http://tangledhelix.com/blog/2012/07/16/tmux-and-mouse-mode/
https://stackoverflow.com/questions/12865559
复制相似问题