Server.hasSession(_:)
Whether a session by this name or id exists.
Source and package
- Qualified name
-
Server.has Session(_:) - Declared in
Server- Package
- libtmux-swift
- Source
- Sources/LibTmux/Server.swift
- Other languages
- Perl Erlang PowerShell Julia Elixir Haskell Common Lisp Python Ruby Lua TypeScriptRustGoJavaC# C++ Kotlin Scala OCaml F# Clojure
-
Description#
Lists sessions and compares in Swift rather than asking
has-sessionto resolve the name: a plain-t namereads an unambiguous abbreviation as a match, so-t alphaanswers yes for a session named onlyalphabet, and-t =nameanswers no for one whose real name holds.or:. Neither target spelling is both exact and universal; listing first and comparing by value is. CheckingisRunning()first keeps this false rather than thrown for a server that is not there yet or just went away --sessions()itself throws on that, unlike thehas-sessionthis replaces.
Guides#
Pages that discuss hasSession(_:).
In other ports#
Whether a session with this name exists
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | server |
| Rust | server |
| Go | tmux |
| Java | io |
| C# | Lib |
| C++ | no equivalent on Server |
| OCaml | No direct public OCaml equivalent is recorded for this operation. |
| Perl | No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands. |
No equivalent is recorded in Ruby, Lua, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.