I want to use tmux's
send-keys to run a series of commands when I log into a remote server
In the linked answer, a single command is used. I've found that I can put a series of them but I've never gotten more than 2 of them to successfully run. Is it possible to introduce a pause between them (since I assume the problem is one of tmux executing them before the remote host can respond)?
The commands will span a change of the logged-in user, which hasn't been problem so far, but that's one reason I can't simply have a script on the server that I run. (tmux doesn't care if I change user but a script can't do that and then continue running.)
So how can I go beyond just 2 commands?
I doubt it is relevant, but I'm running zsh locally and bash on the server.