News for hackers. Stuff that matters.
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.
Re:Scripting tmux by 3xblah on Saturday January 04, 2020 @08:49AM (#21954867)
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.
Re:Scripting tmux by 3xblah on Sunday January 05, 2020 @06:14PM (#21964918)
s/has/now &/

I started using tmux in 2009. There was no -p option when capturep command was first added. Old scripts that keep working tend not to get updated. I have updated it now. Thank you.