CapturedLine
One line of a capture, with what tmux knows about it.
Source and package
- Qualified name
-
libtmux::pane:: Captured Line - Module
- pane
- Package
- libtmux
- Source
- crates/libtmux/src/pane.rs
-
Description#
Built by
Pane::capture_lines(). The marks come from the OSC 133 sequences a shell emits around its prompt, so they are present only when the pane's shell emits them.Examples#
use libtmux::{CaptureOptions, CapturedLine};let guard = libtmux::test::TestServer::new().await?;let server = guard.server();let session = server.new_session("marked").await?;let pane = session.panes().await?.remove(0);if server.capabilities().await?.tmux_version().has_behavior(&libtmux::since::CAPTURE_LINE_FLAGS) {let lines: Vec<CapturedLine> = pane.capture_lines(CaptureOptions::visible()).await?;assert!(lines.iter().all(|line| !line.starts_output || !line.starts_prompt));}guard.shutdown().await?;
Fields4#
| Name | Type | Description |
|---|---|---|
| starts_output | bool | Whether a command's output begins on this line. |
| starts_prompt | bool | Whether a shell prompt begins on this line. |
| text | Tmux | The line's text, without the flags tmux prefixed to it. |
| wrapped | bool | Whether the line continues onto the next row rather than ending. |