libtmux Reference MCP Search
On this page

io.github.libtmux.Pane.Pane.capture

View as Markdown

Module
io.github.libtmux.Pane
Declared in
Pane
Package
io.github.libtmux:libtmux
Source
libtmux/src/main/java/io/github/libtmux/Pane.java
Other languages
PythonTypeScriptRustGo.NETC++Swift
capture ( ) List<String> ( configure : Consumer<CaptureSpec.Builder> ) List<String> ( spec : CaptureSpec ) List<String>
methodoverload3 overloads [source]
methodoverload3 overloads [source]
capture

This pane's visible content, one element per line.

Raises
In other languages Read a pane’s visible contents

Examples

>>> pane = window.split(shell='sh')
>>> pane.capture_pane()
['$']
>>> pane.send_keys('echo "Hello world"', enter=True)
>>> pane.capture_pane()
['$ echo "Hello world"', 'Hello world', '$']
>>> print(chr(10).join(pane.capture_pane()))
$ echo "Hello world"
Hello world
$
const lines = await pane.capture();
lines.at(-1);

0 declared, 0 inherited

Esc

Type to search.