# LibTmux::Window#respawn

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Ruby
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ruby/blob/dcc9f8b5a6970144a9e7d80cd5f381d8f6198372/gems/libtmux/lib/libtmux/operations.rb#L293
- **Page:** https://libtmux.org/en/ruby/v0.1.0.alpha.2/reference/libtmux-window-respawn/

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

```
def respawn: (
  command: ::Array[::String],
  ?kill: bool,
  ?cwd: ::String?,
  ?environment: ::Hash[::String, ::String],
  ?timeout: ::Numeric,
  ?cancel: untyped
) -> ::LibTmux::CommandResult
```

Behavior: Entity mutation.

Behavior contract: Entity mutation.

## In other ports

### Restart the command in a window's active pane

- Python: [`libtmux.Window.respawn`](/en/py/latest/reference/libtmux-window-respawn/) (method)
- Lua: [`libtmux.Window:respawn`](/en/lua/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.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)
