Session.attach_command
A command line that attaches a terminal to this session.
Source and package
- Qualified name
-
libtmux::Session:: attach _command - Namespace
- libtmux
- Declared in
Session- Package
- libtmux-cxx
- Source
- include/libtmux/entities.hpp
- Other languages
- Perl Erlang PowerShell Julia Elixir Haskell Common Lisp Python Ruby Lua TypeScript RustGoJavaC# Swift Kotlin Scala OCaml F# Clojure
- [[
C++ nodiscard attributeAsks the compiler to warn when a result is discarded. An explicit cast to void acknowledges that the result is intentionally ignored.]] expected<AttachCommand , CommandFailure > attach_command() const; -
Description#
Not a method that attaches: a tmux client needs a terminal, and every command this library runs talks to it through pipes, so an attach it performed itself could only ever fail. Spawn the returned argv and retain the value until that client exits.
In other ports#
Attach a client to a session
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | no direct equivalent; the client is out of scope for this port |
| Rust | control |
| Go | tmux |
| Java | io |
| C# | Lib |
| Swift | reached through Server.connected(attachingTo:), which scopes a block rather than attaching a client |
| OCaml | No direct public OCaml equivalent is recorded for this operation. |
| Perl | attach_argv builds caller-owned terminal arguments without performing attachment; the caller owns process and TTY lifetime. |
No equivalent is recorded in Ruby, Lua, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.