ConnectOptions
Options for libtmux.Runtime:connect().
Source and package
- Qualified name
-
libtmux.Connect Options - Module
- libtmux
- Package
- libtmux
- Source
- lua/libtmux/_internal/server.lua
-
Description#
Name the server with
socket_path, or leave it out and let the environment or tmux choose. With nosocket_path,LIBTMUX_SOCKET_PATHnames a socket path (tmux-S), elseLIBTMUX_SOCKETnames a socket (-L), and with neither set tmux gets no socket and picks the server itself: the one inTMUXinside tmux, otherwise its default socket. Asocket_pathoption comes first and leaves both variables unread. A variable that is empty or only whitespace counts as unset, andLIBTMUX_SOCKET_PATHmust be an absolute path.The connection never starts a daemon. A connection that names no socket, or names one with
LIBTMUX_SOCKET, fails withinvalid_endpointwhen tmux finds none running. A socket path, from the option orLIBTMUX_SOCKET_PATH, fails withinvalid_endpointwhen no file is there, and withuncertain_generationwhen the file outlived its server.A socket path is pinned: commands go through a private link to the socket, so a replaced socket stops the handle. Every command also checks the daemon's pid, start time and release. A socket name or tmux's own choice has no path to pin, so that check is the only identity there.
Members3#
Common operations2#
- binary: string attribute Absolute tmux executable path.
- config_path: string? attribute Absolute configuration path.
Other members1#
- socket_path: string? attribute Absolute existing daemon socket path.