Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

Python API

Python documentation

libtmux.Session.detach_client

View as Markdown

Module
libtmux
Declared in
Session
Package
libtmux
Source
src/libtmux/session.py
Other languages
Ruby Lua TypeScriptRustGoJava.NETC++Swift
detach_client ( self , shell_command : str | None = None ) → None
method [source]
method [source]
detach_client

Detach every client attached to this session.

Maps to $ tmux detach-client -s <session_id> — the only detach-client flag group that is genuinely session-scoped.

Parameters
  • shell_command ( str | None ) – Run a shell command on the detached client(s) after detach (-E flag).

In other ports Detach every client attached to a session

Examples

>>> with control_mode() as ctl:
... session.detach_client()
await session.detach();
let guard = libtmux::test::TestServer::new().await?;
let session = guard.server().new_session("busy").await?;
// Nothing is attached in a headless fixture, so this is a no-op.
session.detach_clients().await?;
guard.shutdown().await?;

0 declared, 0 inherited

Esc

Type to search.