libtmux Reference MCP Search
On this page

libtmux.Pane.respawn

View as Markdown

Module
libtmux
Declared in
Pane
Package
libtmux
Source
src/libtmux/pane.py
respawn ( self , shell : str | None = None , start_directory : StrPath | None = None , environment : dict[str, str] | None = None , kill : bool | None = None ) None
method [source]
method [source]
respawn

Respawn the pane process via $ tmux respawn-pane.

Examples

>>> pane = window.split(shell='sleep 1m')
>>> pane.respawn(kill=True, shell='sh')
Parameters
  • shell ( str | None ) – Shell command to run in the respawned pane.

  • start_directory ( StrPath | None ) – Working directory for the respawned pane (-c flag).

  • environment ( dict[str, str] | None ) – Environment variables (-e flag).

  • kill ( bool | None ) – Kill the current process before respawning (-k flag). Required if the pane is still active.

0 declared, 0 inherited

Esc

Type to search.