Workspace ManagerAPI Reference

Choose documentation 2

latest

Current version

latest
English

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

LibTmux.Workspace\Test-TmuxWorkspace

Test-TmuxWorkspace [-Workspace] <LibTmux.Workspace.WorkspaceFile> [-ExistingSession <LibTmux.Workspace.WorkspaceExistingSession>] [-ServerStartup <LibTmux.Workspace.WorkspaceServerStartup>] [-Readiness <LibTmux.Workspace.WorkspaceReadiness>] [-ReadinessTimeout <System.Double>] [-CompensateOnFailure] [-AllowHostScripts] [-HostScriptTimeout <System.Double>] [-MaxHostOutputBytes <System.Int32>] [-CleanupTimeout <System.Double>] [<CommonParameters>]

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

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
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.

Discussed in Workspace guide

Esc

Type to search.

Reference preview Open reference