Core LibraryunreleasedAPI Reference

Choose documentation 2

latest

Current version

latest
English

Unreleased libtmux has not been released. Its API may change during development. This site's structure and URLs may change too.

function libtmux-lisp latest

libtmux:fetch-snapshot

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.

Source and package
Qualified name
libtmux:fetch-snapshot
Declared in
libtmux
Package
libtmux
Source
src/capture.lisp
Other languages
Perlmethod Erlangfunction PowerShellcmdlet Juliafunction Elixirfunction Haskell Python RubyLuaTypeScriptRustmethod GoJavaC# C++ SwiftKotlinScalaOCamlfunction F#function Clojurefunction
(fetch-snapshot client &key cancel-token (timeout (slot-value client (quote timeout))) (output-limit (slot-value client (quote output-limit))) (row-limit 100000) (entity-limit 100000) (field-limit 1048576))

Public owner: libtmux

tmux command#

The tmux commands behind fetch-snapshot.

list-panes -a server scope, cmd_list_panes_server (the server has sessions)

tmux C API#

The C declarations in tmux that implement these commands.

Guides#

Pages that discuss fetch-snapshot.

In other ports#

Capture the tmux hierarchy

Equivalents of Capture the tmux hierarchy in other languages
Language Equivalent
Python no equivalent on Server
Ruby LibTmux::Server#snapshot
Lua libtmux.Server:snapshot
PowerShell LibTmux\Get-TmuxSnapshot Acquires a replacement LibTmux.Server to -Depth (panes by default). Acquisition is not atomic; retained handles do not refresh.
Julia LibTmux.snapshot Acquires a new Snapshot over an observation interval. Topology checks do not make it a transaction; earlier snapshots do not refresh.
Erlang tmux_server:snapshot/1 Captures a new graph over an observation interval. Retained snapshots never refresh.
Elixir LibTmux.Server.snapshot/2 Captures a new graph over an observation interval. A retained Snapshot never refreshes.
Haskell No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
TypeScript server.Server.snapshot
Rust server.Server.hierarchy 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.Server.Snapshot
Java io.github.libtmux.Server.snapshot
Clojure libtmux.core/snapshot! Acquires a captured graph of persistent values. Retained values do not refresh after mutation or close.
Kotlin io.github.libtmux.kotlin.Server.snapshot
Scala io.github.libtmux.scaladsl.Server.snapshot
C# LibTmux.Server.CaptureSnapshotAsync
F# LibTmux.FSharp.Server.capture Acquires a replacement shared .NET LibTmux.Server to the requested depth. Acquisition is not atomic; retained handles do not refresh.
C++ 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
Swift Server.snapshot()
OCaml Libtmux_unix.Client.capture Acquires a complete immutable graph over an interval. Earlier observations remain readable without refreshing.
Perl LibTmux::Server::snapshot Strict acquisition observes an interval, not an atomic transaction; retained handles do not refresh.
Esc

Type to search.

Reference previewOpen reference