libtmux Reference MCP Search
On this page

libtmux.common.get_version_str

View as Markdown

Module
libtmux.common
Package
libtmux
Source
src/libtmux/common.py
get_version_str ( tmux_bin : str | None = None ) str
function [source]
function [source]
get_version_str

Return the tmux version string verbatim, preserving letter suffixes.

get_version normalizes point releases for numeric comparison ("3.7a" becomes LooseVersion("3.7")). This helper keeps the raw suffix, so callers can distinguish patch releases whose behavior differs -- for example the tmux 3.7 break-pane crash, reverted in 3.7a.

Examples

>>> isinstance(get_version_str(), str)
True
Parameters
  • tmux_bin ( str | None ) – Path to tmux binary. If *None*, uses the system tmux.

Returns

str Raw tmux version, e.g. "3.7a". Git builds return "master"; OpenBSD base tmux returns "<max>-openbsd".

0 declared, 0 inherited

Esc

Type to search.