SessionRef
Identify one tmux session on the daemon generation it was captured from. new_session returns one, and a SessionSnapshot carries its own as .ref. Operations check a reference against the running daemon before acting and raise StaleReference or CrossServerReference when it no longer matches.
Source and package
- Qualified name
-
LibTmux. Session Ref - Module
- LibTmux
- Package
- LibTmux
- Source
- src/model.jl
-
Description
SessionRefWhat is on here
A tmux session does a great many things, so this package has a great many functions that take a
SessionRef. In Julia they sit beside the type rather than on it: each takes aServerfirst, and most also have a method for aControlConnection. They fall into a few groups:- Finding the session
- A
Serverhas no lookup by name. Creating a session returns its reference, and a capturedSessionSnapshotcarries its own as.ref. To pick one from a snapshot, give the matching function a criterion; it raisesNoMatchErrororMultipleMatchesErrorinstead of choosing for you. - Return a referenceCaptureCriterionMatch exactly one
- Looking inside a session
- Go down from a captured session to its windows. Listing what a snapshot holds does not contact tmux again.
- Windows of a session, downSnapshot a record came from
- Creating a window
- Create a detached window in the session. An explicit nonnegative
indexrefuses a collision; omit it to use tmux's next available index. The call returns the new window'sWindowRef. - Create
- Renaming and removing
- Renaming takes an exact reference, expands no format text, and still follows tmux's name normalization. An empty name raises
ArgumentError. Removing returns theCommandResult, and a failure after submission is never retried. - RenameRemove
- Placing windows and clients
- Linking and moving a window name a destination session and an explicit index; an occupied index errors unless
replace=true. Switching points an attached client at the session. - Link or move a window inPoint a client at it
- Options, hooks and environment
- A
SessionRefis a scope for options and hooks. It is also a scope for the environment, which:globalshares. Unsetting an entry deletes it, and removing marks a variable for removal from new processes. - Read and set the environmentDelete an entryRemove from new processes
- Formats and control
- Reading formats at a session selects its active window and pane. A control connection attaches to one session, and the output and format-subscription functions need that connection.
- Read typed fieldsExpand a raw expressionAttach to the session
Methods
[source]
- Type parameters
-
-
Bound Lib
Tmux .Entity ID
-
- Parameters
In other ports
task equivalence 22 other ports mappedSource-verified mappings for A tmux session. A mapping says these APIs perform the same task. It does not say they share defaults, errors or completion: check each page.
| Port | API | Differs from Julia |
|---|---|---|
| Julia | Lib Identify one tmux session on the daemon generation it was captured from. new_session returns one, and a SessionSnapshot carries its own as .ref. Operations check a reference against the running daemon before acting and raise StaleReference or CrossServerReference when it no longer matches. | This page |
| Python | libtmux tmux(1) Session [session_manual]. | None recorded in the model |
| Ruby | Lib A session on one server, reached through a handle that wraps an EntityRef.
A handle never caches state: each method runs one tmux command, and
Entity#snapshot reads the session back as a record. Methods take timeout:
and cancel:, and raise CommandError when tmux rejects the command. A
listing that fails raises, so an empty array means tmux answered with nothing
to list. | None recorded in the model |
| Lua | libtmux | None recorded in the model |
| PowerShell | Lib Read sessions with optional exact selectors. | This cmdlet reads and returns shared .NET LibTmux.Session objects. Child windows and panes require further acquisition. |
| Erlang | #tmux | None recorded in the model |
| Elixir | Lib An immutable session observation. Attachment retains tmux's client count. | Session is an immutable observation. Fields not captured read as :unloaded. |
| Haskell | Lib Detached physical session. Navigate its appearances through WindowLink. | Session is a detached physical session. WindowLink records each placement of a window in it, and operations take a generation-bound SessionRef. |
| Common Lisp | libtmux: A captured physical tmux session. | session is an immutable captured entity. The same name also has a relation accessor with a distinct public identity. |
| TypeScript | session One session on one tmux server, as a handle rather than a copy of it. | None recorded in the model |
| Rust | session One tmux session, together with the snapshot it was discovered with. | None recorded in the model |
| Go | tmux Session is one materialized tmux session record. It is normally returned by Server.Snapshot, Server.Session, or Session.Refresh. A zero Session is not a usable tmux target. | None recorded in the model |
| Java | io One tmux session, as one capture saw it. | readonly |
| Clojure | libtmux Acquires captured sessions; acquisition failure throws. | Acquires a vector of captured session maps. The session value is a map, not a wrapper class. |
| Kotlin | io A tmux session and its captured windows and properties. | None recorded in the model |
| Scala | io A captured session, opaque over the Java handle; every operation beyond equality is an extension, generated from the operation catalog or handwritten where the catalog marks it WAIT, STREAM or LIFECYCLE. | 2 overloads |
| C# | Lib Represents an immutable session handle and snapshot. | None recorded in the model |
| F# | Lib Starts queries confined to one session. | 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:: One session, as one listing saw it. | None recorded in the model |
| Swift | Session A tmux session, as it was when the listing was read. | None recorded in the model |
| OCaml | Libtmux | None recorded in the model |
| Perl | Lib Captured session entity | A captured read-only entity; explicit Server operations accept its stable identity. |
| Raku | Lib Captured session with local window-link and group relationships. | None recorded in the model |