On this page
TmuxContext
- Package
- libtmux-swift
- Source
- Sources/LibTmux/TmuxContext.swift
- struct TmuxContext : struct TmuxContext
-
Where the tmux this process is running inside can be found.
tmux sets
$TMUXin every process it starts, holding the socket, the server's pid, and the session — which is how a program launched from a pane can find its way back to the server that launched it without being told.The session arrives as a bare number where
Session/idcarries tmux's$sigil, so it is normalised here. Comparing the two spellings directly is a mismatch that looks like a missing session.
9 declared, 0 inherited
Members
- !=(_:_:) function Returns a Boolean value indicating whether two values are not equal.
- current(environment:) method The context of the tmux this process is running inside, or
nilwhen it is not running inside one. - init(from:) method Creates a new instance by decoding from the given decoder.
- init(parsing:) method Reads the value tmux puts in
$TMUX. - init(socketPath:serverProcessID:sessionID:) method
- server(tmuxExecutable:) method A server addressed at this context's socket.
- serverProcessID property The server process, which is the one thing here that distinguishes two servers that reused a socket path.
- sessionID property The session, normalised to the spelling
Session/iduses. - socketPath property The socket the surrounding server listens on, which is what addressing it again needs.