Core LibraryalphaAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

method libtmux-cxx latest

Server.session

One object by target, for a caller holding an id or a session:window path that came from somewhere else.

Source and package
Qualified name
libtmux::Server::session
Namespace
libtmux
Declared in
Server
Package
libtmux-cxx
Source
include/libtmux/server.hpp
Other languages
Perlmethod Erlang PowerShell Julia Elixir Haskell Common Lisp Python Ruby Lua TypeScript RustGo Java C# Swift Kotlin Scala OCamlfunction F# Clojure
[[C++ nodiscard attributeAsks the compiler to warn when a result is discarded. An explicit cast to void acknowledges that the result is intentionally ignored.Language documentation]] expected<Session, CommandFailure> session(std::string_view target) const;

Description#

The target is resolved the way tmux resolves it, so a session target names that session's active pane and the window that pane is in. A target tmux cannot resolve is reported missing.

Parameters

In other ports#

Look one session up by target

Equivalents of Look one session up by target in other languages
Language Equivalent
Python no equivalent on Server
Ruby LibTmux::Server#session
Erlang tmux_session:get/2
Haskell No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
TypeScript no equivalent on Server
Rust server.Server.session
Go tmux.Server.Session
Java no equivalent on Server
C# LibTmux.Server.GetSessionAsync
Swift no equivalent on Server
OCaml Libtmux.Snapshot.find_session Exact opaque-ID lookup in an existing snapshot, without I/O or tmux target expansion.
Perl LibTmux::Snapshot::session_by_id Captured stable-ID lookup returns an entity or undef. Use Selection::one for strict criteria/name lookup.

No equivalent is recorded in Lua, PowerShell, Julia, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.

Esc

Type to search.

Reference previewOpen reference