Core Library0.xAPI Reference

Choose documentation 2

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.

cmdlet libtmux-powershell latest

LibTmux.Get-TmuxSession

Read sessions with optional exact selectors.

Source and package
Qualified name
LibTmux\Get-TmuxSession
Declared in
LibTmux
Package
LibTmux
Source
src/LibTmux.PowerShell/GetTmuxSessionCommand.cs
Other languages
Juliastruct Elixirstruct PythonRubyLuaTypeScriptRustGoJavaC#C++SwiftKotlinScalaF#module

Description#

Acquire sessions from a native Server. Id and Name are ordinal, case-sensitive literal selectors; combining them requires both to match. Wildcards are not expanded. An unmatched selector emits nothing; a failed acquisition writes an error.

Notes

Wrap results in @() when a stable array is needed. A missing daemon is an error, not a successful empty list. Session-only capture does not acquire windows.

Command details#

Command type
cmdlet
Positional binding
Enabled.
Pipeline inputs
LibTmux.Server: Native pipeline type for this command.
Outputs
LibTmux.Session

Examples#

Example 1 List sessions on the existing server identified by $SocketPath. View source

Terminal window
LibTmux\New-TmuxServer -SocketPath $SocketPath | LibTmux\Get-TmuxSession
Parameters
Common parameters 12

PowerShell supplies these parameters. See common parameter behavior for their effects.

Returns

LibTmux.Session: Native pipeline type for this command.

tmux command#

The tmux commands behind Get-TmuxSession.

tmux C API#

The C declarations in tmux that implement these commands.

Guides#

Pages that discuss Get-TmuxSession.

In other ports#

A tmux session

Equivalents of A tmux session in other languages
Language Equivalent
Python libtmux.Session
Ruby LibTmux::Session
Lua libtmux.Session
Julia LibTmux.SessionSnapshot SessionSnapshot holds captured session data. Actions use its SessionRef, a typed identity bound to an observed daemon generation.
Elixir LibTmux.Session Session is an immutable observation. Fields not captured read as :unloaded.
TypeScript session.Session
Rust session.Session
Go tmux.Session
Java io.github.libtmux.Session
Kotlin io.github.libtmux.kotlin.Session
Scala io.github.libtmux.scaladsl.Session
C# LibTmux.Session
F# LibTmux.FSharp.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
Swift Session

List the server’s sessions

Equivalents of List the server’s sessions in other languages
Language Equivalent
Python libtmux.Server.sessions
Ruby LibTmux::Server#list_sessions
Lua libtmux.Snapshot.sessions
Julia LibTmux.sessions sessions reads membership from a captured Snapshot without contacting tmux.
Elixir LibTmux.Snapshot.sessions/1 Returns a Selection of captured sessions without contacting tmux.
TypeScript server.Server.sessions
Rust server.Server.sessions
Go tmux.Server.Sessions
Java io.github.libtmux.Server.sessions
Kotlin io.github.libtmux.kotlin.Server.sessions
Scala io.github.libtmux.scaladsl.Server.sessions
C# LibTmux.Server.Sessions
F# LibTmux.FSharp.Server.sessions Builds a deferred session query on LibTmux.Server. Query.list acquires the results; it does not traverse the handle’s captured membership.
C++ libtmux::Server::sessions
Swift Server.sessions()
Esc

Type to search.

Reference previewOpen reference