Core LibraryAPI Reference

Choose documentation 2

latest

Current version

latest
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

cmdlet libtmux-powershell latest

LibTmux.Get-TmuxSession

LibTmux\Get-TmuxSession LibTmux\Get-TmuxSession

Read sessions with optional exact selectors.

Source and package
Declared in
LibTmux
Package
LibTmux
Source
src/LibTmux.PowerShell/GetTmuxSessionCommand.cs
Other languages
Julia (struct)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 list-sessions

Discussed in Captured state and I/O · Attaching to tmux , Read tmux objects

In other ports A tmux session
In other ports List the server’s sessions
Esc

Type to search.

Reference preview Open reference