Core Library0.xAPI reference

Choose documentation 1

latest

Current version

latest
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

module libtmux-erlang

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.

Source and package
Qualified name
tmux_pane_text
Package
libtmux_erlang
Source
apps/libtmux_erlang/src/tmux_pane_text.erl

Description

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, display-message and capture-pane behavior. Configured aliases and hooks retain their native effects; see compatibility.

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.

Members7 members

Common operations3

  • await/2 function Collect a result. An await_timeout leaves the wait active.
  • cancel/1 function Request cancellation. Use await/2 for the result and cleanup status.
  • start/3 function Start sampling a live registered pane. Returns after the first bounded capture.

Other members4

  • options/0 type The wait defaults to 2,500 ms and a 16 KiB screen. max_bytes counts captured bytes.
  • release/1 function Release a completed wait and free its endpoint slot. Call cancel/1 to stop an active wait.
  • result/0 type The matching screen and the byte range where the requested text first appears.
  • t/0 type A generation-bound handle for one pane text wait.
Esc
Search in

Type to search.

Reference previewOpen reference