Window.respawn
Respawn the window process via $ tmux respawn-window.
Source and package
-
Examples#
>>> window = session.new_window(window_name='respawn_test')>>> window.respawn(kill=True, shell='sh')- Parameters
-
-
shell(str | None) # – Shell command to run in the respawned window. -
start_directory(StrPath | None) # – Working directory for the respawned window (-cflag). -
environment(dict[str, str] | None) # – Environment variables (-eflag). -
kill(bool | None) # – Kill the current process before respawning (-kflag). Required if the window is still active.
-
tmux command#
The tmux commands behind respawn.
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 |
|---|---|
| Ruby | Lib |
| Lua | libtmux |
| Erlang | tmux |
| 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#.