I'm trying to write a bash script which will setup my tmux environment automatically. Essentially what I need to do is:
- Copy .tmux.conf from my repo
- Clone https://github.com/tmux-plugins/tpm into ~/.tmux/plugins/tpm
- Run tmux
<Prefix>-Iin the tmux session (for me prefix is Ctrl-B)
Steps 1-3 are quite simple, but I don't know how to send a key sequence in bash to a terminal.
I tried running the following command:
tmux send-prefix -t 0; tmux send-keys -t 0 "I
but it didn't work. I got a following error:
I: command not found
.Any ideas on how to make it work?