Core LibraryunreleasedAPI Reference

Choose documentation 1

latest

Current version

latest
English

Unreleased libtmux_erlang has not been released. Its API may change during development. This site's structure and URLs may change too.

function libtmux-erlang latest

tmux_window:respawn/2

Respawn a registered physical window across all its session links. tmux keeps the first pane's ID, removes the other panes and rebuilds a single-pane layout. force defaults false: a window with a running pane normally returns command_error. force = true permits closing existing PTYs. Command completion does not establish former-job termination or application readiness. Other panes can already be removed if a later spawn step fails. Respawn also selects this window in tmux's resolved session. For a window linked into several sessions, tmux chooses that context from the physical ID; this facade does not pin selection or environment to a captured membership.

Source and package
Qualified name
tmux_window:respawn/2
Declared in
tmux_window
Package
libtmux_erlang
Source
apps/libtmux_erlang/src/tmux_window.erl
Other languages
Perl PowerShell Julia Elixir Haskell Common Lisp PythonRubyLuaTypeScriptRustGoJavaC# C++ Swift Kotlin Scala OCaml F# Clojure
respawn(Window, Options) -spec respawn(tmux_model:window(), respawn_options()) -> {ok, tmux_operation:completed()} | {error, tmux_operation:failure()}.

Description#

launch defaults to previous and reuses the retained pane's saved command. Explicit argv and shell maps, saved cwd and fresh-spawn environment rules follow tmux_pane:respawn/2, using the resolved session's environment. This physical-window mutation affects every link. Performs I/O after validation and returns the command result without refreshing rows. Use get/2 or a new snapshot for current data.

tmux command#

The tmux commands behind respawn/2.

tmux C API#

The C declarations in tmux that implement these commands.

In other ports#

Restart the command in a window's active pane

Equivalents of Restart the command in a window's active pane in other languages
Language Equivalent
Python libtmux.Window.respawn
Ruby LibTmux::Window#respawn
Lua libtmux.Window:respawn
Haskell No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
TypeScript window.Window.respawn
Rust window.Window.respawn
Go tmux.Window.Respawn
Java io.github.libtmux.Window.respawn
C# LibTmux.Window.RespawnAsync
C++ no equivalent on Window
Swift no equivalent on Window
OCaml No direct public OCaml equivalent is recorded for this operation.
Perl No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands.

No equivalent is recorded in PowerShell, Julia, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.

Esc

Type to search.

Reference previewOpen reference