On this page
io.github.libtmux.Pane.Pane.capture
- 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>
-
This pane's visible content, one element per line.
- Raises
-
-
UnsupportedTmuxVersion – if the spec asks for something this server does not have
-
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 - .NET
LibTmux.Pane.CaptureAsync - 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