Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

method libtmux-rs latest

CaptureOptions.trailing_spaces

Keep the spaces tmux would otherwise strip from each line's end.

Source and package
Qualified name
libtmux::pane::CaptureOptions::trailing_spaces
Module
pane
Declared in
CaptureOptions
Package
libtmux
Source
crates/libtmux/src/pane.rs
#[must_use = "options describe a capture but do not perform one" ] pub const fn trailing_spaces(mut self) -> Self

Description#

capture-pane trims trailing spaces unless told not to, so a captured line is normally shorter than the pane is wide and a caller comparing against what a program printed sees the difference. This is tmux's -N.

Self::join_wrapped() already keeps them, and additionally joins lines the pane wrapped; this keeps them without joining anything.

Examples#

use libtmux::CaptureOptions;
let exact = CaptureOptions::visible().trailing_spaces();
assert_ne!(exact, CaptureOptions::visible());
Esc

Type to search.

Reference previewOpen reference