Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

Python API

Python documentation

View as Markdown

Module
libtmux
Declared in
Pane
Package
libtmux
Source
src/libtmux/pane.py
Other languages
RubyLuaTypeScriptRustGoJava.NETC++Swift
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.

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.

In other ports Restart a pane's command

Examples

>>> pane = window.split(shell='sleep 1m')
>>> pane.respawn(kill=True, shell='sh')
await pane.respawn("htop", { kill: true });

0 declared, 0 inherited

Esc

Type to search.