Bootstrap scripts and extensions
LibTmux.Workspace 0.0.0-alpha.20 · Source
Use before_script when setup must finish successfully before configured
windows are built. The command is split into an executable and arguments;
shell operators require an explicit shell.
session_name: hooks-examplebefore_script: /bin/sh -c 'printf bootstrap-ready'windows: - window_name: shell panes: [null]The CLI checks the child process status. A failure stops that workspace’s
build. The result describes retained effects; an earlier input or borrowed
session can still exist. A pane’s shell_command only sends input and does
not provide this process-status guarantee.
Paths and output¶
A relative script path beginning with . is resolved from the workspace file.
The script’s working directory uses the configured session directory when
present, otherwise the invocation directory. The script runs before workspace
pane commands. Reusing an existing session does not replay its bootstrap.
Machine output captures or streams child output through the CLI protocol. Read output before parsing bootstrap records.
Prompt readiness¶
The pane_readiness setting under workspace_builder_options accepts auto,
always or never.
It controls a bounded wait before initial pane input. It does not wait for a
server process to accept connections. Commands can still be delivered when
the prompt wait expires.
Optional extensions¶
Nonempty plugins or workspace_builder values select the optional Python
extension runtime. Set TMUX_WORKSPACE_PYTHON to an interpreter with a compatible
tmuxp 1.74 installation. Ordinary documents use the native builder.
Extensions run executable code and can make changes outside the CLI’s own tracked operations. Inspect reported effects and errors before retrying them.