# window.Window.respawn

- **Module:** window.Window
- **Package:** @libtmux/libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/2cb93308200da38a26b59876618116850f110607/packages/libtmux/src/window.ts#L341
- **Page:** https://libtmux.org/reference/ts/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 });
```
