libtmux Reference MCP Search
On this page

tmux.Server.HasSession

View as Markdown

Module
tmux
Declared in
Server
Package
github.com/libtmux/libtmux-go/tmux
Source
tmux/session_lifecycle.go
HasSession ( ctx : context.Context , request : HasSessionRequest ) (bool, error)
method [source]
method [source]
HasSession

HasSession reports whether Target selects a session. With Pattern false it compares session names exactly; with Pattern true, tmux may resolve IDs, client TTYs, unique prefixes, or globs. Pattern-mode completed nonzero exits are misses. Exact-name lookup treats ErrNoServer as a miss and returns other failures.

Exact-name lookup lists sessions because tmux's exact-match marker still resolves identifiers and client TTYs.

0 declared, 0 inherited

Esc

Type to search.