Answers:
放在$SHELL
脚本的末尾:
一个小缺陷:由于gnome-terminal
未运行bash
外壳程序,因此将其视为应用程序,并在您尝试关闭终端时显示警告:
There is still a process running in this terminal
Closing the terminal will kill it.
我找不到隐藏此警告的好方法。如果需要,可以通过运行以下命令完全禁用它:
gconftool --set /apps/gnome-terminal/global/confirm_window_close --type boolean false
如果您使用的xterm
不是gnome-terminal,则不会发生这种情况;应该打扰你。
对临时管道使用bash
的--init-file
选项:
bash --init-file <(echo './<script_name>')
例如:
bash --init-file <(echo './bla.sh')
exec $SHELL
而不只是$SHELL
使警告消失而不更改设置。