Core Library0.xAPI Reference

Choose documentation 3

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.

Go API

method libtmux-go latest

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.CaptureTo
Package
tmux
Declared in
Pane
Distribution
github.com/libtmux/libtmux-go/tmux
Source
tmux/pane_capture.go

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 returns ErrConnectionRequiresProcess; Pane.CaptureToFile stages through a tmux buffer and runs over a connection.

tmux command#

The tmux commands behind CaptureTo.

tmux C API#

The C declarations in tmux that implement these commands.

Esc

Type to search.

Reference previewOpen reference