Randal Schwartz
Answer by Randal Schwartz for TMUX: how to make new window stay when start shell-command quits? - http://stackoverflow.com/questio...
I use send-keys so that it "types" the command into the shell. Here's my get.all script, which fires up many commands, some of which I may need to interact with after they're done (and the ones I don't, have exit): #!/bin/sh tmux att -t get || tmux \ new -s get -n emacs \; \ send-keys 'get.emacs' C-m \; \ neww -n git \; \ send-keys 'get.git' C-m \; \ neww -n mini \; \ send-keys 'get.mini' C-m \; \ neww -n port \; \ send-keys 'get.port' C-m \; \ neww -n rakudo \; \ send-keys 'get.rakudo' C-m \; \ neww -n neil \; \ send-keys 'get.neil && get.neil2 && exit' C-m \; \ neww -n red \; \ send-keys 'get.red && exit' C-m \; \ neww -n cpan \; \ send-keys 'get.cpan && exit' C-m \; \ selectw -t emacs - Randal Schwartz