Pane.session
Return the session this pane was reached through.
Source and package
- Qualified name
-
libtmux::pane:: Pane:: session - Module
- pane
- Declared in
Pane- Package
- libtmux
- Source
- crates/libtmux/src/pane.rs
- Other languages
- Perl Erlang PowerShell Julia Elixir Haskell Common Lisp Python Ruby Lua TypeScriptGo Java C#C++ Swift Kotlin Scala OCaml F# Clojure
-
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.A window can be linked into several sessions, so this is the session this handle was reached through rather than the pane's only one; the pane itself belongs to exactly one window.
Errors
Returns an error when the session listing fails.
Examples#
if let Some(session) = pane.session().await? {println!("{}", session.name().to_string_lossy());}
In other ports#
The session containing a pane
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | pane |
| Go | tmux |
| Java | no equivalent on Pane |
| C# | Lib |
| C++ | libtmux:: |
| Swift | no equivalent on Pane |
| OCaml | A pane belongs to a global window that can have several session placements. Traverse Window.links and Window_link.session. |
| Perl | A physical pane’s window can be linked into several sessions; choose an explicit WindowLink context. |
No equivalent is recorded in Ruby, Lua, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.