# window.Window.respawn

- **Module:** window.Window
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/window.ts#L359
- **Page:** https://libtmux.org/en/ts/latest/reference/window-window-respawn/

```
window.Window.respawn(command: : string, options: : RespawnOptions) -> Promise<void>
```

Restart the command running in this window's active pane.

tmux refuses a window that is still running something unless `kill` says
to replace it.

## Example

```ts
await window.respawn("sh", { kill: true });
```
