Core Library0.xAPI reference

Choose documentation 1

pr-173

Current version

pr-173
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

function libtmux-elixir

Pane.wait_for_text/4

Polls an exact pane through one-shot capture and returns the first matching screen.

Source and package
Qualified name
LibTmux.Pane.wait_for_text/4
Module
LibTmux
Declared in
Pane
Package
libtmux
Source
lib/libtmux/entities.ex

Description

The result has the same bounded bytes and capture evidence as capture/3. text is 1..1048576 literal bytes. The default match: :substring searches the captured bytes. match: :line requires one whole newline-delimited line and rejects newlines in text. A match can be on the first screen. To wait for an application receipt, choose text that typed input cannot echo. The result observes the screen and carries no program exit status.

Range, byte and verification options follow capture/3. The default interval is 100ms after a nonmatching capture. Identity checks, capture calls and intervals share the original timeout, which defaults to 5000ms. Native retirement can take its separate cleanup allowance. A Control connection returns unsupported_transport before I/O.

An unmatched deadline returns LibTmux.Error with kind :timeout and phase :wait_for_text. Its details include expected, match, attempts, elapsed_ms and last_screen. The last screen is nil until a capture completes. If a capture itself times out, its phase and transport evidence remain in the error with the wait details under details.text_wait. Other capture failures, including a missing pane, propagate with their evidence.

See the worked receipt example.

Recorded calls

source calls
No call edges in the Elixir model.

The Elixir reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls LibTmux.Pane.wait_for_text/4.

Esc
Search in

Type to search.

Reference previewOpen reference