use match() instead of index() for finding a line in tmux pane test output
use sync subprocess call when expecting output
always reset command pid when querying process status
be more concise in tmux pane test