我正在编写 tmux 1.4 版脚本并尝试打开新窗口,如下所示:
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 的输出出现在窗口 1 中,但什么也没有出现。我的 ~/.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 上尝试它,事情会按预期工作。
有任何想法吗?
谢谢,