Hey there, maybe you can help? I've been defeated many times trying to do this.
I want to run one script (e.g. happycoding.sh) that:
- opens my dev env in multiple tabs, preferrably zsh
- each tab runs a command line to start database, api, www tests, etc.
- when that command terminates (crashes, exits, ctrl-c 'd, etc) , zsh continues in interactive mode
Long ago, I was able to do it in gnome--terminal, but I can't figure out how to do it now. Maybe gnome removed it?
Anyways, here's what I've tried:
#!/bin/bash mate-terminal --tab --working-directory ~/casefile/www -e "zsh -c 'yarn dev ; exec zsh -i'" mate-terminal --tab -e "zsh -c 'cd www ; yarn install && yarn dev ; exec zsh -i'" mate-terminal --tab -e "zsh -i <(echo 'cd www ; yarn install && yarn dev')"
I tried a bunch of different gnome-terminal and zsh options, but honestly, I'm just flipping switches at this point without a plan.
Do you know a way it works? Thank you!