LibTmux.Get-TmuxSession
Read sessions with optional exact selectors.
Source and package
- Get-TmuxSession [-Server] <Lib
Tmux > [-Id <System.Server .String >] [-Name <System.String >] [<CommonParameters >] -
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
Listsessions on the existing server identified by$SocketPath. View sourceTerminal window LibTmux\New-TmuxServer -SocketPath $SocketPath | LibTmux\Get-TmuxSession- Parameters
-
-
The server whose sessions are read.
- Required
- Yes
- Position
- 0
- Pipeline input
- By value
- Validation
ValidateNotNull()
-
An ordinal, literal session identifier selector.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Completion
ArgumentCompleter("LibTmux.PowerShell.SessionSelectorCompleter")- Validation
ValidateNotNullOrEmpty()
-
An ordinal, literal session name selector.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Completion
ArgumentCompleter("LibTmux.PowerShell.SessionSelectorCompleter")- Validation
ValidateNotNullOrEmpty()
Common parameters 12
PowerShell supplies these parameters. See common parameter behavior for their effects.
-
-Verbose(System.Management ) #.Automation .Switch Parameter Display verbose messages produced by this command.
Aliases:vbMicrosoft Learn reference -
-Debug(System.Management ) #.Automation .Switch Parameter Display debug messages produced by this command.
Aliases:dbMicrosoft Learn reference -
-ErrorAction(System.Management ) #.Automation .Action Preference Choose how this command responds to non-terminating errors.
Aliases:eaMicrosoft Learn reference -
-WarningAction(System.Management ) #.Automation .Action Preference Choose how this command responds to warning messages.
Aliases:waMicrosoft Learn reference -
-InformationAction(System.Management ) #.Automation .Action Preference Choose how this command handles information messages.
Aliases:infaMicrosoft Learn reference -
-ProgressAction(System.Management ) #.Automation .Action Preference Choose how this command handles progress updates.
Aliases:progaMicrosoft Learn reference -
-ErrorVariable(System.String ) #Store the command's error records in the named variable.
Aliases:evMicrosoft Learn reference -
-WarningVariable(System.String ) #Store the command's warning records in the named variable.
Aliases:wvMicrosoft Learn reference -
-InformationVariable(System.String ) #Store the command's information records in the named variable.
Aliases:ivMicrosoft Learn reference -
-OutVariable(System.String ) #Save output in the named variable while passing it down the pipeline.
Aliases:ovMicrosoft Learn reference -
Buffer output before passing it to the next pipeline command.
Aliases:obMicrosoft Learn reference -
-PipelineVariable(System.String ) #Make the most recent output object available through a named variable within the pipeline.
Aliases:pvMicrosoft Learn reference
-
- 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.
- Concepts
In other ports#
A tmux session
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Ruby | Lib |
| Lua | libtmux |
| Julia | Lib SessionSnapshot holds captured session data. Actions use its SessionRef, a typed identity bound to an observed daemon generation. |
| Elixir | Lib Session is an immutable observation. Fields not captured read as :unloaded. |
| TypeScript | session |
| Rust | session |
| Go | tmux |
| Java | io |
| Kotlin | io |
| Scala | io |
| C# | Lib |
| F# | Lib 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:: |
| Swift | Session |
List the server’s sessions
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Ruby | Lib |
| Lua | libtmux |
| Julia | Lib sessions reads membership from a captured Snapshot without contacting tmux. |
| Elixir | Lib Returns a Selection of captured sessions without contacting tmux. |
| TypeScript | server |
| Rust | server |
| Go | tmux |
| Java | io |
| Kotlin | io |
| Scala | io |
| C# | Lib |
| F# | Lib Builds a deferred session query on LibTmux.Server. Query.list acquires the results; it does not traverse the handle’s captured membership. |
| C++ | libtmux:: |
| Swift | Server |