Core Library0.xGuides

Choose documentation 2

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

Inspect attached clients

Needs libtmux for PowerShell 0.x Install

Read the terminal and control clients already attached to a selected native $server. A plain server handle does not attach a client or own its lifetime.

Terminal window
$server | Get-TmuxClient

Each result is a Client with Name, Tty, IsControlClient, AttachedSessionId and Generation.

  • -Name matches an exact, case-sensitive name, with no wildcards.
  • No clients, or no match, produces no objects.
  • An unavailable server produces an error.

Captured fields do not change when a client switches sessions. Refresh a selected $client to observe it again:

Terminal window
$client | Update-TmuxClient

This reads current data and does not redraw the terminal. Refreshing a detached client writes the native missing-object error.

Resolve the client’s current session, window and pane together:

Terminal window
$client | Get-TmuxClientAttachment

The result is a ClientAttachment.

  • A detached client or missing session produces no output, and Window or Pane can be null.
  • It makes several tmux reads and is not an atomic observation.
  • Transport failures are errors, not empty results.

These commands only inspect clients. To detach, lock or suspend one, send a raw tmux command. Closing a client does not remove its session or daemon.

Esc
Search in

Type to search.

Reference previewOpen reference