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.

function libtmux-cxx latest

socket_from_environment

Reads LIBTMUX_SOCKET_PATH, then LIBTMUX_SOCKET.

Source and package
Qualified name
libtmux::socket_from_environment
Namespace
libtmux
Package
libtmux-cxx
Source
include/libtmux/socket.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]] EnvironmentSocket socket_from_environment();

Description#

The path wins when both are set, as tmux's -S overrides -L. A variable that is empty or only whitespace counts as unset, each one alone, so an empty path leaves a set name in force. Any other value is returned as it was given. TMUX is not read: tmux follows it by itself when no socket is passed.

Esc

Type to search.

Reference previewOpen reference