- workspace.Build ( ctx : context.Context , server : tmux.Server , workspace : Workspace ) (tmux.Session, error)
-
Build creates the workspace on server and returns the created session.
Build is not atomic. A failure after session creation returns that session; completed mutations remain in tmux. Command failures are not normalized.
Build creates the session and an attached control connection in one process, uses that connection for the build, and closes it before returning. The returned Session is not bound to the closed connection. Build verifies that the session remains reachable after closing it. An attached connection may fire client hooks and policies.
Each pane receives workspace, window, and pane CommandsBefore, then its own Commands. Sleep values pause Build rather than the pane.
Discussed in Build a workspace from a file · Go workspace internals , Go workspace builder examples , Use the Go workspace builder , Go workspace builder behavior , Go workspace builder API
In other ports Build a session from a workspace description
- Python
tmuxp.workspace.builder.ClassicWorkspaceBuilder.build - Ruby
LibTmux::Workspace::Plan#apply - Lua No source-verified Lua equivalent is recorded for this operation.
- TypeScript
builder.applyWorkspace - Rust
src.WorkspaceBuilder.build - Java
io.github.libtmux.workspace.WorkspaceBuilder.WorkspaceBuilder.build - .NET
LibTmux.Workspace.WorkspaceBuilder.BuildAsync - C++
libtmux::workspace::build - Swift
WorkspaceBuilder.build(_:on:)
- Python