LibTmux.Get-TmuxSnapshot
Capture a replacement tmux hierarchy.
Source and package
- Qualified name
-
LibTmux\ Get-Tmux Snapshot - Declared in
LibTmux- Package
- LibTmux
- Source
- src/LibTmux.PowerShell/GetTmuxSnapshotCommand.cs
- 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
- 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 -
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.
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
Recorded calls
source callsThe PowerShell reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls LibTmux\Get-TmuxSnapshot.
Guides
task materialPages that discuss Get-TmuxSnapshot.
- Concepts
- Examples
In other ports
task equivalence 19 other ports mappedSource-verified mappings for Capture the tmux hierarchy. A mapping says these APIs perform the same task. It does not say they share defaults, errors or completion: check each page.
| Port | API | Differs from PowerShell |
|---|---|---|
| PowerShell | Lib Capture a replacement tmux hierarchy. | This page |
| Ruby | Lib Behavior: Snapshot acquisition. | None recorded in the model |
| Lua | libtmux | None recorded in the model |
| Julia | Lib | 2 overloads Acquires a new Snapshot over an observation interval. Topology checks do not make it a transaction; earlier snapshots do not refresh. |
| Erlang | tmux Capture a complete immutable graph with default capture limits. Performs I/O. See snapshot/2 for bounds, consistency and conflict errors. | Captures a new graph over an observation interval. Retained snapshots never refresh. |
| Elixir | Lib Captures a new graph explicitly, with bounded work and read retries. | Captures a new graph over an observation interval. A retained Snapshot never refreshes. |
| Common Lisp | libtmux: Acquire an eager native graph; all later accessors on it are local.
TIMEOUT controls one acquisition deadline and OUTPUT-LIMIT caps combined output,
including at most two retries after contradictory observations. Synchronous
setup and additional cleanup can extend caller wall time. ROW-LIMIT bounds each listing;
ENTITY-LIMIT bounds the complete graph; FIELD-LIMIT bounds encoded field bytes.
No daemon is started. A live daemon with zero sessions yields empty vectors;
connection/listing failures remain errors. Closing CLIENT leaves this snapshot
usable. This is an interval observation, not a transactional snapshot. | fetch-snapshot acquires a new interval observation. Retained snapshots never refresh in place. |
| TypeScript | server Acquire an immutable view of the server at this instant. | None recorded in the model |
| Rust | server Fetch the whole hierarchy in three commands. | async Fetches the whole hierarchy with list-sessions, list-windows -a and list-panes -a, and stitches the rows by winlink. The three listings are separate commands, so the capture is not an atomic transaction. |
| Go | tmux Snapshot materializes sessions, winlinks, panes, and clients. Its sequential commands produce an observationally consistent result, not an atomic transaction. Failures remain errors rather than empty snapshots; cancellation may occur after earlier listings completed. | None recorded in the model |
| Java | io Captures the whole hierarchy in at most four listings, retrying once if the server is replaced. | None recorded in the model |
| Clojure | libtmux Acquires an eager captured graph from an explicit server. | Acquires a captured graph of persistent values. Retained values do not refresh after mutation or close. |
| Kotlin | io Captures the whole hierarchy in at most four listings, retrying once if the server is replaced. | async |
| Scala | io Captures the whole hierarchy in at most four listings, retrying once if the server is replaced. | None recorded in the model |
| C# | Lib Reads the server and answers a handle carrying what it found. | None recorded in the model |
| F# | Lib Returns a new server handle captured to the requested depth. | Acquires a replacement shared .NET LibTmux.Server to the requested depth. Acquisition is not atomic; retained handles do not refresh. |
| Swift | Server Reads every object from one daemon incarnation. | async |
| OCaml | Libtmux Acquire a complete graph over a recorded interval, with a fixed number of listing commands. Races fail validation. Access to returned values performs no I/O, including after closing the client. | Acquires a complete immutable graph over an interval. Earlier observations remain readable without refreshing. |
| Perl | Lib snapshot(). | Strict acquisition observes an interval, not an atomic transaction; retained handles do not refresh. |
| Raku | Lib Acquire a captured graph explicitly. Existing snapshots remain unchanged. | Explicit I/O captures an observation interval. Existing views and relationships remain local. |
no equivalent on Server
No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
no equivalent on Server: sessions, windows, panes and clients each take a snapshot of one listing, and Snapshot::take needs the internal detail::Backend, so no public call reads the whole hierarchy at once