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

Go API

Go documentation

tmux.Pane.CaptureToFile

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
CaptureToFile ( ctx : context.Context , path : string , request : CapturePaneRequest ) → ([]string, error)
method [source]
method [source]
CaptureToFile

CaptureToFile captures the receiver's exact linked pane through a tmux buffer and the file at path, returning the same lines Pane.Capture returns.

Printed captures cannot safely cross a control connection, so Pane.Capture and Pane.CaptureBytes use a subprocess or reject a connection. CaptureToFile stages through a scratch buffer so capture, save, and cleanup can all use the connection's command lanes.

path must name a file the tmux server can write and this process can read. It is replaced and left for the caller. Concurrent calls must use distinct paths. The scratch tmux buffer is deleted before return when possible.

Validation and version gating match Pane.Capture . Capture, save, and file-read failures return an error with no lines; buffer cleanup is best effort.

0 declared, 0 inherited

Esc

Type to search.