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

server.Server.hasSession

TypeScript

View as Markdown

Module
server
Declared in
Server
Package
libtmux
Source
packages/libtmux/src/server.ts
Other languages
Python Ruby Lua RustGoJava.NET C++ Swift
hasSession ( name : : string ) → Promise<boolean>
method [source]
method [source]
hasSession

Whether a session with this name exists.

The name is matched exactly. tmux normally accepts a unique prefix as a session target, which would make checking work answer yes for workspace; this method does not.

Examples

if (!(await server.hasSession("work"))) {
await server.newSession({ name: "work" });
}
In other ports Whether a session with this name exists

0 declared, 0 inherited

Esc

Type to search.