Håk*_*and 14 gnome-terminal 17.10
从 Ubuntu 17.04 升级到 17.10 后,从命令行-e启动时,我收到有关该选项已弃用的警告gnome-terminal。例如,假设我想打开一个带有两个选项卡的 gnome 终端,并在每个选项卡中运行单独的命令:
$ gnome-terminal --tab --active -e 'bash -c "echo Hello; exec bash"' --tab -e 'bash -c "echo Hello2; exec bash"'
Option “-e” is deprecated and might be removed in a later version of gnome-terminal.
Use “-- ” to terminate the options and put the command line to execute after it.
Option “-e” is deprecated and might be removed in a later version of gnome-terminal.
Use “-- ” to terminate the options and put the command line to execute after it.
Run Code Online (Sandbox Code Playgroud)
但是,如果我应该--用来终止选项,我该如何为每个选项卡运行单独的命令?例如,以下不起作用:
$ gnome-terminal --tab --active -- bash -c "echo Hello; exec bash" --tab -- bash -c "echo Hello2; exec bash"
Run Code Online (Sandbox Code Playgroud)
它只打开一个选项卡。
我认为下面的命令可以为你解决问题:
gnome-terminal --tab --active -- bash -c "echo Hello; exec bash" && gnome-terminal --tab -- bash -c "echo Hello2; exec bash"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3978 次 |
| 最近记录: |