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

Go API

Go documentation

View as Markdown

Module
tmux
Declared in
Pane
Package
github.com/libtmux/libtmux-go/tmux
Source
tmux/pane_capture.go
Other languages
PythonRubyLuaTypeScriptRustJava.NETC++Swift
Capture ( ctx : context.Context , request : CapturePaneRequest ) → ([]string, error)
method [source]
method [source]
Capture

Capture captures printed content from the receiver's exact linked pane. It returns a caller-owned slice. A completed nonzero exit or stderr becomes a CommandError ; any stdout tmux still printed is returned alongside it.

This is a point-in-time capture rather than a stream; the zero request reads the visible screen. It may include a shell's echo of Pane.SendKeys input. Compare whole lines when polling; use ControlClient.NextNotification or Server.WaitFor when the application exposes a stream or explicit signal.

Invalid positions fail before execution. Transport and context failures return any partial stdout with the error.

In other ports Read a pane’s visible contents

0 declared, 0 inherited

Esc

Type to search.