libtmux Reference MCP Search
On this page

libtmux::format_request

View as Markdown

Module
libtmux
Package
libtmux-cxx
Source
include/libtmux/snapshot.hpp
format_request ( fields : std::span< const std::string_view > ) std::string
function [source]
function [source]
format_request

Build the format argument for one entity's fields, terminating every field so a trailing empty value is still a value rather than a missing column.

The two substitutions nest rather than run in sequence, because tmux applies the inner one to the raw value and the outer one to its result. In that order a value already holding the escape marker is neutralised before the separator pass can produce one; reversed, the two become indistinguishable.

#{s/…/…/:…} predates every tmux this library supports, and neither character is a regular-expression metacharacter.

Unconditional, rather than applied only to the fields that could carry a separator. Expanding the substitutions costs about 0.32us per row — a 61-row listing pays 19us, against a process launch of some milliseconds — and a per-field exemption list is a thing to get wrong later, once, silently.

0 declared, 0 inherited

Esc

Type to search.