Session
One session on one tmux server, as a handle rather than a copy of it.
Source and package
-
Description#
Reached from
Server.sessions()or by creating one; the constructor throws. The tmux format row the handle was built from reads back throughformat, and by tmux's own field names directly on the handle — a snapshot taken when the handle was made, not a live view.A session outlives the clients attached to it: killing the last client leaves the session running, which is the property the whole tool is built around.
Members32#
Parent objects1#
Collections and queries2#
Common operations25#
- newWindow method Create a window in this session and resolve it as a handle.
- kill method Destroy this session.
- rename method Rename this session.
- showHooks method Every hook this session reports.
- showOptions method Every option set on this session itself, not the ones it inherits.
- showEnvironment method Every variable in this session's environment.
- detach method Detach every client attached to this session.
- activeWindow method The window tmux marks active in this session.
- setOption method Set an option on this session.
- unsetOption method Remove an option from this session.
- setHook method Bind a tmux command to a hook on this session.
- setEnvironment method Set a variable in this session's environment.
- unsetEnvironment method Drop a variable from this session's environment entirely.
- activePane method The pane tmux marks active in this session's active window.
- refreshed method This session, read again at a new instant.
- unsetHook method Remove a hook from this session.
- removeEnvironment method Mark a variable in this session's environment for removal from the environment of processes tmux starts, leaving the entry in place.
- selectWindow method Select the last, next, or previous window, or one named by target.
- cmd method Run a tmux command this package does not model, addressed at this session.
- fromEnv method Resolve the session this process is running inside.
- getEnvironment method One variable from this session's environment, or
undefinedwhen tmux carries no entry. - equals method Whether
otheris this same session on this same server. - plan method The same mutations, described instead of run.
- sameTmuxIdAs method Whether
othercarries the same$n, wherever it came from. - showResolvedOptions method The option values that govern this session, own and inherited together.
Other members4#
- constructor method
- format: Session
Row property The raw tmux format row, addressed by tmux's own token names. - sessionBrand: undefined attribute
- toString method How this handle renders in a log line, a template literal, or an error.
Guides#
Pages that discuss Session.
- Concepts
- Topics
In other ports#
A tmux session
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Ruby | Lib |
| Lua | libtmux |
| PowerShell | Lib This cmdlet reads and returns shared .NET LibTmux.Session objects. Child windows and panes require further acquisition. |
| Julia | Lib SessionSnapshot holds captured session data. Actions use its SessionRef, a typed identity bound to an observed daemon generation. |
| Elixir | Lib Session is an immutable observation. Fields not captured read as :unloaded. |
| Rust | session |
| Go | tmux |
| Java | io |
| Kotlin | io |
| Scala | io |
| C# | Lib |
| F# | Lib This F# module builds deferred child queries from a shared .NET LibTmux.Session and its server association. Query.list acquires their results from tmux. |
| C++ | libtmux:: |
| Swift | Session |