Pane.CaptureTo
CaptureTo streams printed content from the receiver's exact linked pane into destination without holding a screen in memory, which is what makes a long scrollback affordable to write straight to a file or a compressor. Like Pane.Capture it reads the screen at one point in time rather than following it; the zero request reads the visible screen and version-gated fields follow UnsupportedPolicy.
Source and package
- Qualified name
-
tmux.Pane. Capture To - Package
- tmux
- Declared in
Pane- Distribution
- github.com/libtmux/libtmux-go/tmux
- Source
- tmux/pane_capture.go
- func (p Pane) CaptureTo( ctx context
.Context , destination io.Writer , request CapturePane , ) errorRequest -
Description#
Completed stderr becomes a redacted command error, because CaptureTo returns no bytes for the caller to inspect; a nonzero exit with empty stderr is not an error, as for every command. Cancellation does not prove destination received the complete screen, and a copy failure takes precedence over a completed command's exit status because it means destination never saw everything tmux sent. Printed captures always use a subprocess, so a
Connection-bound Pane returnsErrConnectionRequiresProcess;Pane.CaptureToFilestages through a tmux buffer and runs over a connection.- Parameters
tmux command#
The tmux commands behind CaptureTo.
tmux C API#
The C declarations in tmux that implement these commands.