tmux_wait_for_text
Monitor a tmux pane and pause execution until a specified substring or regex pattern appears, with configurable timeout.
Instructions
Wait until pattern appears in a pane, or timeout seconds elapse.
pattern is a substring by default, or a regular expression when
regex=True. history optionally includes that many scrollback lines in
each check (-S -history). Returns {"matched", "elapsed", "content"} where
content is the last capture taken.
Caveat: the pane also shows the command you typed, so a pattern can match
your own echoed input line rather than the command's output. To wait for
a command to finish and get just its output, prefer tmux_run.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target_pane | Yes | ||
| pattern | Yes | ||
| timeout | No | ||
| regex | No | ||
| history | No | ||
| poll_interval | No | ||
| target | No |