Core LibraryunreleasedAPI reference

Choose documentation 3

latest

Current version

latest
English

Unreleased LibTmux has not been released. Its API may change during development. This site's structure and URLs may change too.

MoreLess about this notice

function LibTmux.jl

capture_bytes

Source and package
Qualified name
LibTmux.capture_bytes
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.

Recorded calls

source calls
No call edges in the Julia model.

The Julia 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.capture_bytes.

tmux command

task material

The tmux commands behind capture_bytes.

capture-pane save-buffer (on a ControlConnection) delete-buffer (on a ControlConnection) list-buffers (on a ControlConnection)

tmux C API

task material

The C declarations in tmux that implement these commands.

Guides

task material

Pages that discuss capture_bytes.

Esc
Search in

Type to search.

Reference previewOpen reference