# pane.Pane.respawn

- **Module:** pane.Pane
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/8a648c0894dfffc9303583f753b6c8ae01f2fe76/crates/libtmux/src/pane.rs#L879
- **Page:** https://libtmux.org/reference/rs/pane-pane-respawn/

```
pane.Pane.respawn(mut, command: Option<impl Into<OsString>>, kill: bool) -> Result<&mut Self, Error>
```

Restart the pane's command in place.

Passing `None` reruns whatever the pane started with.

# Errors

Returns an error when the pane is still running and `kill` is not set.
