LibTmux.Get-TmuxSnapshot
LibTmux\Get-TmuxSnapshot Capture a replacement tmux hierarchy.
Source and package
- Declared in
- LibTmux
- Package
- LibTmux
- Source
- src/LibTmux.PowerShell/GetTmuxSnapshotCommand.cs
- Other languages
- Julia (function) Python RubyLuaTypeScript Rust GoJavaC# C++ SwiftKotlinScalaF# (function)
- Get-TmuxSnapshot [-Server] <Lib
Tmux > [-Depth <Lib.Server Tmux >] [<Common.Snapshot Depth Parameters >] -
Description#
Read the explicit server endpoint to the requested
Depth. The default Panes depth captures sessions, contextual windows and panes. Shallower snapshots leave deeper relations unavailable. The input handle and previous captures remain unchanged.SnapshotMetadatarecords depth, daemon generation, UTC start/end readings and monotonic Elapsed time. Use Elapsed for duration because UTC can be adjusted. EvenServerdepth performs a fresh generation-guarded read.Captured parents and active children retain their exact graph instances when the requested depth includes them. Repeated links keep their session/index placement; filtering panes does not prune their parent's captured relations.
Notes
Acquisition spans multiple tmux commands and does not promise an atomic view. Contradictory topology or active references fail with
InconsistentSnapshotExceptionwithout publishing a partial graph or retrying. Equal-count changes can escape detection.Tmux.SnapshotFailedretains the native exception and target; useErrorActionStop to stop later owners. Property access uses captured data; unavailable relations throw rather than appearing empty.Command details#
- Command type
cmdlet- Positional binding
- Enabled.
- Pipeline inputs
-
LibTmux.Server: Native pipeline type for this command. - Outputs
-
LibTmux.Server
Examples#
Example 1 Capture the hierarchy of the existing server identified by
$SocketPath. View sourceTerminal window LibTmux\New-TmuxServer -SocketPath $SocketPath |LibTmux\Get-TmuxSnapshot -Depth Panes- Parameters
-
-
The server to read.
- Required
- Yes
- Position
- 0
- Pipeline input
- By value
- Validation
ValidateNotNull()
-
-Depth(LibTmux ) #.Snapshot Depth The deepest hierarchy level to capture.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Validation
ValidateSet(["Server","Sessions","Windows","Panes"])
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.Server: Native pipeline type for this command.
Discussed in Captured state and I/O · Create windows and panes · Getting started , Read tmux objects
In other ports Capture the tmux hierarchy
- Julia
LibTmux.snapshotAcquires a new
Snapshotover an observation interval. Topology checks do not make it a transaction; earlier snapshots do not refresh. - Python no equivalent on
Server - Ruby
- Lua
- TypeScript
- Rust no equivalent on
Server - Go
- Java
- C#
- C++ no equivalent on
Server - Swift
- Kotlin
- Scala
- F#
LibTmux.FSharp.Server.captureAcquires a replacement shared .NET
LibTmux.Serverto the requested depth. Acquisition is not atomic; retained handles do not refresh.