Core LibraryunreleasedAPI reference

Choose documentation 3

latest

Current version

latest
English

Unreleased LibTmux has not been released. Its API may change during development. This site's structure and URLs may change too.

MoreLess about this notice

typealias LibTmux.jl

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.SessionRef
Module
LibTmux
Package
LibTmux
Source
src/model.jl

Description

SessionRef

What 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 a Server first, and most also have a method for a ControlConnection. They fall into a few groups:

Finding the session
A Server has no lookup by name. Creating a session returns its reference, and a captured SessionSnapshot carries its own as .ref. To pick one from a snapshot, give the matching function a criterion; it raises NoMatchError or MultipleMatchesError instead of choosing for you.
Return a reference
Capture
Criterion
Match 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, down
Snapshot a record came from
Creating a window
Create a detached window in the session. An explicit nonnegative index refuses a collision; omit it to use tmux's next available index. The call returns the new window's WindowRef.
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 the CommandResult, and a failure after submission is never retried.
Remove
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 in
Point a client at it
Options, hooks and environment
A SessionRef is a scope for options and hooks. It is also a scope for the environment, which :global shares. Unsetting an entry deletes it, and removing marks a variable for removal from new processes.
Read and set the environment
Delete an entry
Remove 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 fields
Expand a raw expression
Attach to the session

Methods

[source]

Type parameters
Parameters

In other ports

task equivalence 22 other ports mapped

Source-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.

A tmux session in each port
PortAPIDiffers from Julia
Julia LibTmux.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.
This page
Python libtmux.Session
tmux(1) Session [session_manual].
None recorded in the model
Ruby LibTmux::Session
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.Session None recorded in the model
PowerShell LibTmux\Get-TmuxSession
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_model:session{} None recorded in the model
Elixir LibTmux.Session
An immutable session observation. Attachment retains tmux's client count.
Session is an immutable observation. Fields not captured read as :unloaded.
Haskell LibTmux.Snapshot.Session
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:session
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.Session
One session on one tmux server, as a handle rather than a copy of it.
None recorded in the model
Rust session.Session
One tmux session, together with the snapshot it was discovered with.
None recorded in the model
Go tmux.Session
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.github.libtmux.Session
One tmux session, as one capture saw it.
readonly
Clojure libtmux.core/sessions!
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.github.libtmux.kotlin.Session
A tmux session and its captured windows and properties.
None recorded in the model
Scala io.github.libtmux.scaladsl.Session
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# LibTmux.Session
Represents an immutable session handle and snapshot.
None recorded in the model
F# LibTmux.FSharp.Session
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::Session
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.Session.t None recorded in the model
Perl LibTmux::Session
Captured session entity
A captured read-only entity; explicit Server operations accept its stable identity.
Raku LibTmux::Model::Session
Captured session with local window-link and group relationships.
None recorded in the model
Esc
Search in

Type to search.

Reference previewOpen reference