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

Go API

Go documentation

tmux.Pane.CaptureTo

Go
  • Python Unavailable
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust Unavailable
  • Go
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

View as Markdown

Module
tmux
Declared in
Pane
Package
github.com/libtmux/libtmux-go/tmux
Source
tmux/pane_capture.go
CaptureTo ( ctx : context.Context , destination : io.Writer , request : CapturePaneRequest ) → error
method [source]
method [source]
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 .

A completed nonzero exit becomes a redacted command error, because CaptureTo returns no bytes for the caller to inspect. 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.

0 declared, 0 inherited

Esc

Type to search.