Bash / open a terminal with a command to run passed as an argument
I created a script that starts all the apps I need for my day and assign them to the workspaces I want.
I'd like to know is there was a way to pass an argument to the terminal I open. The argument would be an alias that runs a massive source update of all the p开发者_开发百科rojects I'm working on.
I'd like to do something like this:
gnome-terminal start_rolls
Unfortunately, this only opens the terminal and the command is simply not run.
Any ideas ? Thanks in advance !
Rolf
P.S.: the -e option does not work with aliases, it seems...
gnome-terminal --help-terminal-options
says:
-e, --command Execute the argument to this option inside the terminal
some combination of "-e
", "bash -c
", "bash -i
" and your alias might help
-e is going to be deprecated in future releases you should use something like this:
gnome-terminal -- bash -c "vim Main.java"
you can replace "vim Main.java" for whatever you want
精彩评论