tmux_pane:respawn/2
Respawn this registered physical pane, keeping its pane ID. force defaults false and a running pane normally returns command_error. force = true lets tmux close its existing PTY before spawning again. This acknowledges the tmux command, not former-job termination or successful application initialization. The old PTY can already be closed if a later spawn step fails.
Source and package
- Qualified name
-
tmux_pane: respawn/2 - Declared in
tmux_pane- Package
- libtmux_erlang
- Source
- apps/libtmux_erlang/src/tmux_pane.erl
- Other languages
- Perl PowerShell Julia Elixir Haskell Common Lisp PythonRubyLuaTypeScriptRustGoJavaC#C++Swift Kotlin Scala OCaml F# Clojure
- respawn(Pane, Options) -spec respawn(tmux
_model: (), respawnpane _options ()) -> {ok, tmux_operation: ()} | {error, tmuxcompleted _operation: ()}.failure -
Description#
launch defaults to previous, reusing tmux's saved argv or shell. An explicit argv or shell map replaces that command. default_shell is invalid here because absent respawn arguments mean saved-command reuse. Omitted cwd retains the saved launch directory, rather than the program's current directory. env augments the session environment tmux resolves for this physical pane; a captured membership does not pin that context. Prior per-spawn overrides are not automatically reapplied. Other launch rules follow
tmux_session:create/2.Performs I/O after validation. Existing rows retain their observations; use
get/2and an application readiness condition to inspect the new process. An uncertain result is not permission to replay this mutation automatically.Unsupported launch modes fail before dispatch:
Examples#
1> tmux_pane:respawn(invalid_row, #{launch => default_shell}).{error,#{code => invalid_launch}}- Parameters
-
-
Pane(tmux_model: ()) #pane -
Options(respawn_options ()) #
-
tmux command#
The tmux commands behind respawn/2.
tmux C API#
The C declarations in tmux that implement these commands.
Guides#
Pages that discuss respawn/2.
In other ports#
Restart a pane's command
| 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 | pane |
| Rust | pane |
| Go | tmux |
| Java | io |
| C# | Lib |
| C++ | libtmux:: |
| Swift | Server |
| OCaml | Libtmux |
| 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#.