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

Python API

Python documentation

libtmux.Window.respawn

View as Markdown

Module
libtmux
Declared in
Window
Package
libtmux
Source
src/libtmux/window.py
Other languages
RubyLuaTypeScriptRustGoJava.NET C++ 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 window process via $ tmux respawn-window.

Parameters
  • shell ( str | None ) – Shell command to run in the respawned window.

  • start_directory ( StrPath | None ) – Working directory for the respawned window (-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 window is still active.

In other ports Restart the command in a window's active pane

Examples

>>> window = session.new_window(window_name='respawn_test')
>>> window.respawn(kill=True, shell='sh')
await window.respawn("sh", { kill: true });

0 declared, 0 inherited

Esc

Type to search.