capture_bytes
Source and package
- Module
- LibTmux
- Package
- LibTmux
- Source
- src/pane_io.jl
- capture_bytes( connection::Lib
Tmux , pane::Lib.Control Connection Tmux ; start.Pane Ref _line , end_line , join_wrapped , preserve_trailing , escapes, alternate, max_bytes , timeout, cancel ) capture_bytes( server::LibTmux , pane::Lib.Server Tmux ; start.Pane Ref _line , end_line , join_wrapped , preserve_trailing , escapes, alternate, max_bytes , kwargs... ) -
Methods#
capture_bytes( connection::Lib
Tmux , pane::Lib.Control Connection Tmux ; start.Pane Ref _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-buffercompletion 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).timeoutis one operation deadline. Cancellation is followed by a separate uncancelled 900 ms buffer cleanup budget. If remote cleanup cannot be proved,ControlBufferCleanupErrorretains its buffer reference; a primary failure is preserved in aCompositeException. The owned local spool is always removed. There is no subprocess fallback or retry.capture_bytes( server::Lib
Tmux , pane::Lib.Server Tmux ; start.Pane Ref _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=truejoins soft-wrapped lines and implies tmux's trailing-space preservation.preserve_trailing=truerequestscapture-pane -N;escapes=trueincludes 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=:historyselects its beginning andend_line=:bottomselects the screen bottom.alternate=truerequests the alternate screen and errors if it is unavailable. Screen capture does not reconstruct the original terminal byte stream.- Parameters
-
-
connection( LibTmux ) (for.Control Connection capture_bytes(connection, pane, start_line, end_line, join_wrapped, preserve_trailing, escapes, alternate, max_bytes, timeout, cancel)) # -
pane( LibTmux ) #.Pane Ref -
start_line=nothing# -
join_wrapped=false( Bool ) # -
preserve_trailing=false( Bool ) # -
timeout=5.0( Real ) (forcapture_bytes(connection, pane, start_line, end_line, join_wrapped, preserve_trailing, escapes, alternate, max_bytes, timeout, cancel)) # -
cancel=nothing( Union{Nothing, CancellationToken } ) (forcapture_bytes(connection, pane, start_line, end_line, join_wrapped, preserve_trailing, escapes, alternate, max_bytes, timeout, cancel)) # -
server( LibTmux ) (for.Server capture_bytes(server, pane, start_line, end_line, join_wrapped, preserve_trailing, escapes, alternate, max_bytes, kwargs)) # -
kwargs(forcapture_bytes(server, pane, start_line, end_line, join_wrapped, preserve_trailing, escapes, alternate, max_bytes, kwargs)) #
-
Discussed in Ownership and I/O