Core Library0.xAPI 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-rs latest

Window.session

Return the session this window was reached through.

Source and package
Qualified name
libtmux::window::Window::session
Module
window
Declared in
Window
Package
libtmux
Source
crates/libtmux/src/window/navigation.rs
Other languages
Perlmethod Erlang PowerShell Julia Elixir Haskell Common Lisp PythonRubyLuaTypeScriptGoJavaC#C++ Swift KotlinScalaOCamlfunction F# Clojure
pub async fn session(&self) -> Result< Option<Session>, Error >

Description#

This re-reads tmux rather than the snapshot, so a session renamed or removed since discovery is reported as it is now. Ok(None) means the session no longer exists.

Errors

Returns an error when the session listing fails.

Guides#

Pages that discuss session.

In other ports#

Find the session containing a window placement

Equivalents of Find the session containing a window placement in other languages
Language Equivalent
Python libtmux.Window.session
Ruby LibTmux::WindowLink#session
Lua libtmux.SnapshotWindowLink.session
Haskell No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
TypeScript window.Window.session
Go tmux.Window.Session
Java io.github.libtmux.Window.session
Kotlin io.github.libtmux.kotlin.Window.session
Scala io.github.libtmux.scaladsl.Window.session
C# LibTmux.Window.Session
C++ libtmux::Window::session
Swift a Window has no single parent; Snapshot.sessions(of:) lists every linking session
OCaml Libtmux.Window_link.session The session belongs to a placement. A global Window has no single containing session.
Perl LibTmux::WindowLink::session The session belongs to an explicit WindowLink placement; a physical Window has no arbitrary single session.

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

Esc

Type to search.

Reference previewOpen reference