Re:Scripting tmux
by tyingq on Saturday January 04, 2020 @08:36AM
(#21954824)
Replacing the sleeps with calls to "tmux capture-pane" to parse the responses would be closer to expect.
[ Parent
| on HN ]
Brainless method I use to check the panel:
case $1 in
""|-b|-E|-S|-t)
tmux capturep $@ --;
tmux showb $@ --;
exec tmux dele --;
esac
Also there is a "-N repeat count" option for send-keys in newer versions of tmux.
Re:Scripting tmux
by abcdef123xyz2 on Sunday January 05, 2020 @03:26PM
(#21963802)
capture-pane has -p so you can pipe its output rather than letting it create a buffer you have to delete.