On this page
LibTmux.Pane.CaptureAsync
- 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>>
-
Reads the pane's contents.
- Parameters
-
-
request ( CapturePaneRequest? ) – What to capture.
-
cancellationToken ( CancellationToken ) – Cancels the tmux command.
-
- Returns
-
The captured lines.
In other languages Read a pane’s visible contents
- Python
libtmux.Pane.capture_pane - TypeScript
pane.Pane.capture - Rust
pane.observe.Pane.capture - Go
tmux.Pane.Capture - Java
io.github.libtmux.Pane.Pane.capture - C++
libtmux::Pane::capture - Swift
Server.capture(_:since:limit:)
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