2011-03-22 107 views
1

我脚本TMUX 1.4版本,并试图打开新窗口,如下所示:TMUX新窗口不显示命令输出

tmux new-session -d 
tmux new-window ifconfig 
tmux list-windows 
    0: bash [80x23] [layout b85e,80x23,0,0] 
    1: ifconfig [80x23] [layout b85e,80x23,0,0] (active) 
tmux attach 
... no output 

我希望使用ifconfig的输出出现在窗口,但是最出现。我的〜/ .tmux.conf文件中也有set-option -g set-remain-on-exit on行。

如果我运行一些其他的命令,有时候输出显示出来:

tmux new-window "curl www.google.com" 
tmux attach 
... lots of output 

通过尝试不同的命令,好像都显示很长的输出。短输出不会出现。

这只发生在Linux中。如果我在使用相同tmux版本构建的Mac OS X上尝试它,事情会按预期工作。

任何想法?

谢谢,

回答

1

这听起来很奇怪。

是tmux历史记录中的ifconfig输出吗? (C-b [和上一页]

您附加的终端比tmux 1.4将用于新的未连接的窗口的默认80x24小得多吗?

也尝试完全杀死tmux并在环境中重新导出EVENT_NOEPOLL = 1。

如果你还没有弄明白,如果你在用户dot sf dot net或tmux-users邮件列表中发送nicm信息,这可能是最好的。

0

如果您将shell命令传递给tmux new-window命令,那么只要shell命令运行完毕,它就会关闭窗格和窗口。

此外,我已经遇到了设置全局set-remain-on-exit选项的情况不能按预期工作的情况。

尝试运行一个不会退出的命令,如top

tmux new-window 'top' 

另外,尝试运行短命令后启动一个新的shell。

tmux new-window 'ifconfig;bash -i' 

参考文献:

Prevent pane/window from closing when command completes - tmux

How do I get tmux to open up a set of panes without manually entering them?