libtmux Reference MCP Search
On this page

version.TmuxVersion.parse_output

View as Markdown

Module
version
Declared in
TmuxVersion
Package
libtmux
Source
crates/libtmux/src/version.rs
parse_output ( output : &[u8] ) Result<Self, Error>
method [source]
method [source]
parse_output

Parse the exact output from tmux -V.

The output must contain one nonempty program-name token, one version token, and one trailing newline. Invalid process output is never stored in the returned error.

Errors

Returns Error::InvalidVersionOutput for malformed framing or version syntax, unsupported characters, extra lines, or invalid UTF-8.

Examples

use libtmux::TmuxVersion;

let version = TmuxVersion::parse_output(b"tmux 3.7b\n")?;
assert_eq!(version.raw(), "3.7b");

0 declared, 0 inherited

Esc

Type to search.