# libtmux.Window:respawn

- **Module:** libtmux
- **Package:** libtmux
- **Language:** Lua
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-lua/blob/d68f829fe097e38dcbbf7147e276666fe615f0cf/lua/libtmux/_internal/entity.lua#L459
- **Page:** https://libtmux.org/en/lua/v0.1.1/reference/libtmux-window-respawn/

```
respawn: fun(
  self: libtmux.Window,
  options: libtmux.RespawnWindowOptions,
):libtmux.Request<boolean>
```

## Parameters

- `options` (`libtmux.RespawnWindowOptions`)

## tmux command

The tmux commands behind `respawn`.

- [`respawn-window`](/en/tmux/latest/manual/respawn-window/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_respawn_window_entry`](/en/tmux/latest/reference/c-variable-cmd_respawn_window_entry/) (attribute)
- [`cmd_respawn_window_exec`](/en/tmux/latest/reference/c-function-cmd-respawn-window-c-cmd_respawn_window_exec/) (function)

## In other ports

Restart the command in a window's active pane

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Window.respawn`](/en/py/latest/reference/libtmux-window-respawn/) (method) |
| Ruby | [`LibTmux::Window#respawn`](/en/ruby/latest/reference/libtmux-window-respawn/) (method) |
| TypeScript | [`window.Window.respawn`](/en/ts/latest/reference/window-window-respawn/) (method) |
| Rust | [`window.Window.respawn`](/en/rs/latest/reference/window-window-respawn/) (method) |
| Go | [`tmux.Window.Respawn`](/en/go/latest/reference/tmux-window-respawn/) (method) |
| Java | [`io.github.libtmux.Window.respawn`](/en/java/latest/reference/io-github-libtmux-window-window-respawn/) (method) |
| C# | [`LibTmux.Window.RespawnAsync`](/en/csharp/latest/reference/libtmux-window-respawnasync/) (method) |
| C++ | no equivalent on `Window` |
| Swift | no equivalent on `Window` |

No equivalent is recorded in PowerShell, Julia, Elixir, Kotlin, Scala or F#.
