libtmux Reference MCP Search
On this page

libtmux.Server.has_session

View as Markdown

Module
libtmux
Declared in
Server
Package
libtmux
Source
src/libtmux/server.py
has_session ( self , target_session : str , exact : bool = True ) bool
method [source]
method [source]
has_session

Return True if session exists.

Parameters
  • target_session ( str ) – session name

  • exact ( bool ) – match the session name exactly. tmux uses fnmatch by default. Internally prepends = to the session in $ tmux has-session.

Returns

bool

Raises

0 declared, 0 inherited

Esc

Type to search.