Workspace ManagerconceptAPI reference

Choose documentation 2

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

Concept example A working example of the core library. It can change without notice. What concept means

LibTmux.Workspace\Test-TmuxWorkspace

Validate a workspace declaration and its intended policies locally.

Description

Apply the shared .NET declaration and policy checks to a native WorkspaceFile. Validation reads no tmux state and executes no commands or scripts. Importing a workspace checks syntax; this command additionally rejects incomplete or invalid declarations under the supplied policy.

Validation returns True on success. An invalid declaration writes its native error and returns False; ErrorAction Stop terminates instead. Invalid policy parameters terminate before processing input.

Local validation does not check endpoint conflicts, paths on disk, shell syntax or tmux option support. Reuse defers host-script admission until planning knows whether creation is needed. Use Get-TmuxWorkspacePlan for endpoint observation and a reviewable plan; the validation result is not permission to apply it.

Notes

Tmux.WorkspaceValidationFailed retains the native exception and declaration. Tmux.InvalidWorkspacePolicy identifies invalid policy parameters.

Command details

Command type
cmdlet
Positional binding
Enabled.
Pipeline inputs
LibTmux.Workspace.WorkspaceFile: A parsed or programmatically constructed declaration.
Outputs
System.Boolean
Parameters
Common parameters 12

PowerShell supplies these parameters. See common parameter behavior for their effects.

Returns

System.Boolean: True for a valid declaration; False after a nonterminating validation error.

Examples

Example 1 Check a one-window declaration without opening a tmux connection. View source

Terminal window
LibTmux.Workspace\Import-TmuxWorkspace -Yaml @'
session_name: development
windows:
- panes: [null]
'@ | LibTmux.Workspace\Test-TmuxWorkspace

Guides

task material

Pages that discuss Test-TmuxWorkspace.

Workspace
Esc
Search in

Type to search.

Reference previewOpen reference