TmuxContext
Where the tmux this process is running inside can be found.
Source and package
- Qualified name
-
TmuxContext - Package
- libtmux-swift
- Source
- Sources/LibTmux/TmuxContext.swift
- struct TmuxContext : struct Tmux
Context -
Description#
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.
Members7#
Common operations1#
- current(environment:) method The context of the tmux this process is running inside, or
nilwhen it is not running inside one.
Other members6#
- 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: let server
Process : Int property The server process, which is the one thing here that distinguishes two servers that reused a socket path.ID - sessionID: let session
ID : SessionID property The session, normalised to the spellingSession.iduses. - socketPath: let socket
Path : String property The socket the surrounding server listens on, which is what addressing it again needs.
Inherited members2 members#
Reached through Equatable.!=(_:_:), Decodable.init(from:).
- !=(_:_:) function inherited Returns a Boolean value indicating whether two values are not equal.
- init(from:) method inherited Creates a new instance by decoding from the given decoder.
Guides#
Pages that discuss TmuxContext.