Core LibraryalphaAPI 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-cxx latest

Session.expand

Ask tmux to expand a format against this session.

Source and package
Qualified name
libtmux::Session::expand
Namespace
libtmux
Declared in
Session
Package
libtmux-cxx
Source
include/libtmux/entities.hpp
[[C++ nodiscard attributeAsks the compiler to warn when a result is discarded. An explicit cast to void acknowledges that the result is intentionally ignored.Language documentation]] expected<std::string, CommandFailure> expand(std::string_view format) const;

Description#

The fields above are what a session is; this reaches the rest of tmux's vocabulary without a method per variable.

A target tmux cannot find is not an error to tmux. It expands the fields it cannot resolve to nothing, prints the literals around them, and exits zero — so a session that has been killed answers with a blank that reads like a value. This asks for the session's own id alongside the caller's format and reports FailureKind::missing when the answer is not this session.

Parameters
Esc

Type to search.

Reference previewOpen reference