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.]] EnvironmentSocket socket_from_environment(); -
Description#
The path wins when both are set, as tmux's
-Soverrides-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.TMUXis not read: tmux follows it by itself when no socket is passed.