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

Go API

Go documentation

tmux.Server.HasSession

Go

View as Markdown

Module
tmux
Declared in
Server
Package
github.com/libtmux/libtmux-go/tmux
Source
tmux/session_lifecycle.go
Other languages
Python Ruby Lua TypeScriptRustJava.NET C++ Swift
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.

In other ports Whether a session with this name exists

0 declared, 0 inherited

Esc

Type to search.