# tmux_pane_text

- **Package:** libtmux_erlang
- **Language:** Erlang
- **Kind:** module
- **Source:** https://github.com/libtmux/libtmux-erlang/blob/38478dff54579a4f408005d0265031abdf3a880a/apps/libtmux_erlang/src/tmux_pane_text.erl#L1
- **Page:** https://libtmux.org/en/erlang/latest/reference/tmux_pane_text/

Wait for literal bytes in a pane's current screen on a registered endpoint. Owned and borrowed endpoints use their captured Linux daemon identity. The pane must still contain the same live process. Replacement, respawn and removal end the wait.

`start/3` reads the first screen before returning a handle. Text already on
the screen can match at this point. Send any input after it returns.
The wait uses bounded captures at intervals, so text can appear and disappear
between samples. A match reports visible content only.
The wait installs no hooks, options or pipes. Its capture guard requires native
[`if-shell`](/en/tmux/latest/manual/if-shell/), [`display-message`](/en/tmux/latest/manual/display-message/) and [`capture-pane`](/en/tmux/latest/manual/capture-pane/) behavior. Configured aliases
and hooks retain their native effects; see [compatibility](compatibility.md).

The starting process owns the wait. `await/2` can time out independently
while the wait continues. Cancel it explicitly or let the owner exit.
Completed handles retain their result for up to 60 seconds. An owner or
endpoint that exits retires its handles. Call `release/1` to free the result
sooner. The endpoint limits concurrent and retained waits.

## Members

### Common operations

- [`await/2`](/en/erlang/latest/reference/tmux_pane_text-await-2/) (function): Collect a result. An await_timeout leaves the wait active.
- [`cancel/1`](/en/erlang/latest/reference/tmux_pane_text-cancel-1/) (function): Request cancellation. Use `await/2` for the result and cleanup status.
- [`start/3`](/en/erlang/latest/reference/tmux_pane_text-start-3/) (function): Start sampling a live registered pane. Returns after the first bounded capture.

### Other members

- [`options/0`](/en/erlang/latest/reference/t-tmux_pane_text-options-0/) (typealias): The wait defaults to 2,500 ms and a 16 KiB screen. max_bytes counts captured bytes.
- [`release/1`](/en/erlang/latest/reference/tmux_pane_text-release-1/) (function): Release a completed wait and free its endpoint slot. Call `cancel/1` to stop an active wait.
- [`result/0`](/en/erlang/latest/reference/t-tmux_pane_text-result-0/) (typealias): The matching screen and the byte range where the requested text first appears.
- [`t/0`](/en/erlang/latest/reference/t-tmux_pane_text-t-0/) (typealias): A generation-bound handle for one pane text wait.
