tmux_window:respawn/2
Respawn a registered physical window across all its session links. tmux keeps the first pane's ID, removes the other panes and rebuilds a single-pane layout. force defaults false: a window with a running pane normally returns command_error. force = true permits closing existing PTYs. Command completion does not establish former-job termination or application readiness. Other panes can already be removed if a later spawn step fails. Respawn also selects this window in tmux's resolved session. For a window linked into several sessions, tmux chooses that context from the physical ID; this facade does not pin selection or environment to a captured membership.
Source and package
- Qualified name
-
tmux_window: respawn/2 - Declared in
tmux_window- Package
- libtmux_erlang
- Source
- apps/libtmux_erlang/src/tmux_window.erl
- Other languages
- Perl PowerShell Julia Elixir Haskell Common Lisp PythonRubyLuaTypeScriptRustGoJavaC# C++ Swift Kotlin Scala OCaml F# Clojure
- respawn(Window, Options) -spec respawn(tmux
_model: (), respawnwindow _options ()) -> {ok, tmux_operation: ()} | {error, tmuxcompleted _operation: ()}.failure -
Description#
launch defaults to previous and reuses the retained pane's saved command. Explicit argv and shell maps, saved cwd and fresh-spawn environment rules follow
tmux_pane:respawn/2, using the resolved session's environment. This physical-window mutation affects every link. Performs I/O after validation and returns the command result without refreshing rows. Useget/2or a new snapshot for current data.- Parameters
-
-
Window(tmux_model: ()) #window -
Options(respawn_options ()) #
-
tmux command#
The tmux commands behind respawn/2.
tmux C API#
The C declarations in tmux that implement these commands.
In other ports#
Restart the command in a window's active pane
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Ruby | Lib |
| Lua | libtmux |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | window |
| Rust | window |
| Go | tmux |
| Java | io |
| C# | Lib |
| C++ | no equivalent on Window |
| Swift | no equivalent on Window |
| 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 PowerShell, Julia, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.