Bash / open a terminal with a command to run passed as an argument
-
26-09-2019 - |
Question
I created a script that starts all the apps I need for my day and assign them to the workspaces I want.
Given I'm a extreme-lazy basterd, 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 projects 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...
Solution
gnome-terminal --help-terminal-options
says:
-e, --command Execute the argument to this option inside the terminal
OTHER TIPS
some combination of "-e
", "bash -c
", "bash -i
" and your alias might help