libtmux Reference MCP Search
On this page

LibTmux.Pane.CaptureAsync

View as Markdown

Module
LibTmux
Declared in
Pane
Package
LibTmux
Source
src/LibTmux/Pane.Capture.cs
Other languages
PythonTypeScriptRustGoJavaC++Swift
CaptureAsync ( request : CapturePaneRequest? , cancellationToken : CancellationToken ) Task<IReadOnlyList<string>>
methodasync [source]
methodasync [source]
CaptureAsync

Reads the pane's contents.

Parameters
Returns

The captured lines.

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.