Core LibraryAPI Reference

Choose documentation 3

latest

Current version

latest
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

function LibTmux.jl latest

capture_bytes

Module LibTmux.capture_bytes LibTmux
Source and package
Module
LibTmux
Package
LibTmux
Source
src/pane_io.jl

Methods#

capture_bytes( connection::LibTmux.ControlConnection, pane::LibTmux.PaneRef; start_line, end_line, join_wrapped, preserve_trailing, escapes, alternate, max_bytes, timeout, cancel )[source]#

Capture through the existing control connection using a uniquely owned tmux buffer and private local spool. Pane text never enters the control reply parser. The buffer size is checked before disk output, and the same-queue fence proves save-buffer completion before reading. This transport requires the tmux daemon and Julia to share the local filesystem. tmux's file write may block its event loop; yielding Julia I/O does not make that write asynchronous.

capture_bytes(connection::ControlConnection, pane::PaneRef; kwargs...)

Screen options match capture_bytes(server, pane). timeout is one operation deadline. Cancellation is followed by a separate uncancelled 900 ms buffer cleanup budget. If remote cleanup cannot be proved, ControlBufferCleanupError retains its buffer reference; a primary failure is preserved in a CompositeException . The owned local spool is always removed. There is no subprocess fallback or retry.

capture_bytes( server::LibTmux.Server, pane::LibTmux.PaneRef; start_line, end_line, join_wrapped, preserve_trailing, escapes, alternate, max_bytes, kwargs... )[source]#

Capture tmux's screen representation as owned bytes. The default keeps screen line breaks and tmux's usual trailing-space trimming. join_wrapped=true joins soft-wrapped lines and implies tmux's trailing-space preservation. preserve_trailing=true requests capture-pane -N; escapes=true includes style escape sequences. No additional trimming or newline conversion occurs.

capture_bytes(server, pane; start_line=nothing, end_line=nothing,
join_wrapped=false, preserve_trailing=false, escapes=false,
alternate=false, max_bytes=8388608, kwargs...)

Negative line numbers address history; start_line=:history selects its beginning and end_line=:bottom selects the screen bottom. alternate=true requests the alternate screen and errors if it is unavailable. Screen capture does not reconstruct the original terminal byte stream.

Discussed in Ownership and I/O

Esc

Type to search.

Reference preview Open reference