from_env
Source and package
- Module
- LibTmux
- Package
- LibTmux
- Source
- src/server.jl
- from_env(; env, socket
_path , socket_name , tmux) -
Methods#
Read the endpoint from
TMUX, or select the nameddefaultsocket when it is absent. Explicit selectors take precedence. Return aServerdescription without contacting tmux or starting a daemon.from_env(; env=ENV, socket_path=nothing, socket_name=nothing, tmux="tmux")See also
- Parameters
-
-
Mapping used to read
TMUX. The value must contain a socket path, process ID, and session index separated by commas. An absent or empty value selects the nameddefaultsocket; a malformed value raisesArgumentError. Explicit socket selectors bypass this lookup. -
socket_path=nothing#Path to a tmux socket. When supplied, select this endpoint instead of reading
env; relative paths become absolute against the current directory. Supply eithersocket_pathorsocket_name, never both. An empty path or a path containing NUL raisesArgumentError. -
socket_name=nothing#Name of a tmux socket, used as tmux's
-Lselector. When supplied, select this endpoint instead of readingenv. The name must be nonempty and contain neither a slash nor NUL. Supply eithersocket_nameorsocket_path, never both. -
Executable name or path for later operations on the returned server. A bare name is resolved through
PATHwhen an operation runs. This call checks that the value is a nonempty string without NUL; it does not check whether the executable or socket exists.
-
Discussed in Getting started