- Module
- session
- Package
- libtmux
- Source
- packages/libtmux/src/session.ts
- Other languages
- PythonRubyLuaRustGoJava.NETC++Swift
-
One session on one tmux server, as a handle rather than a copy of it.
Reached from
Server.sessionsor 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.
Discussed in TypeScript workspace builder behavior , TypeScript workspace builder API · Architecture
In other ports A tmux session
- Python
libtmux.Session - Ruby
LibTmux::Session - Lua
libtmux.Session - Rust
session.Session - Go
tmux.Session - Java
io.github.libtmux.Session.Session - .NET
LibTmux.Session - C++
libtmux::Session - Swift
Session
- Python
32 declared, 0 inherited
Members
- windows method Windows placed in this session, in listing order.
- panes method Panes contained by this session's windows.
- 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.
- server attribute The server this handle addresses.
- 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.
- constructor method
- format property The raw tmux format row, addressed by tmux's own token names.
- sessionBrand attribute
- toString method How this handle renders in a log line, a template literal, or an error.