LibTmux.Workspace\Test-TmuxWorkspace
- Test-TmuxWorkspace [-Workspace] <LibTmux.Workspace.WorkspaceFile> [-Existing
Session <LibTmux.Workspace.WorkspaceExistingSession>] [-ServerStartup <LibTmux.Workspace.WorkspaceServerStartup>] [-Readiness <LibTmux.Workspace.WorkspaceReadiness>] [-ReadinessTimeout <System.Double >] [-CompensateOn ] [-AllowFailure Host ] [-HostScripts Script <SystemTimeout .Double >] [-MaxHost <SystemOutput Bytes .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;
ErrorActionStop 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-TmuxWorkspacePlanfor endpoint observation and a reviewable plan; the validation result is not permission to apply it.Notes
Tmux.WorkspaceValidationFailedretains the native exception and declaration.Tmux.InvalidWorkspacePolicyidentifies 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: developmentwindows:- panes: [null]'@ | LibTmux.Workspace\Test-TmuxWorkspace- Parameters
-
-
-Workspace(LibTmux.Workspace.WorkspaceFile) #The immutable declaration to check.
- Required
- Yes
- Position
- 0
- Pipeline input
- By value
- Validation
ValidateNotNull()
-
-ExistingSession(LibTmux.Workspace.WorkspaceExistingSession) #Reuse defers host-script admission until planning determines whether creation is necessary.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Default
Error- Validation
ValidateSet(["Error","Reuse","Append","Replace"])
-
-ServerStartup(LibTmux.Workspace.WorkspaceServerStartup) #The startup policy intended for planning; validation does not inspect the endpoint.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Default
CreateOrJoin- Validation
ValidateSet(["CreateOrJoin","RequireExisting"])
-
-Readiness(LibTmux.Workspace.WorkspaceReadiness) #The declared startup contract; validation does not wait for or prove shell readiness.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Default
Immediate- Validation
ValidateSet(["Immediate","Cooperative"])
-
-ReadinessTimeout(System.Double ) #A finite positive readiness budget in seconds, at most 86400.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Default
10
-
-CompensateOnFailure(System.Management ) #.Automation .Switch Parameter Validate the policy that permits compensation of journal-owned creations after application failure.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
- Default
False
-
-AllowHostScripts(System.Management ) #.Automation .Switch Parameter Admit declared host scripts for planning. Validation never executes them.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
- Default
False
-
-HostScriptTimeout(System.Double ) #A finite positive host-script budget in seconds, at most 86400.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Default
30
-
-MaxHostOutputBytes(System.Int32 ) #A positive combined stdout and stderr capture limit in UTF-8 bytes.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Default
1048576
-
-CleanupTimeout(System.Double ) #A finite positive application cleanup budget in seconds, at most 86400.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Default
1
Common parameters 12
PowerShell supplies these parameters. See common parameter behavior for their effects.
-
-Verbose(System.Management ) #.Automation .Switch Parameter Display verbose messages produced by this command.
Aliases:vbMicrosoft Learn reference -
-Debug(System.Management ) #.Automation .Switch Parameter Display debug messages produced by this command.
Aliases:dbMicrosoft Learn reference -
-ErrorAction(System.Management ) #.Automation .Action Preference Choose how this command responds to non-terminating errors.
Aliases:eaMicrosoft Learn reference -
-WarningAction(System.Management ) #.Automation .Action Preference Choose how this command responds to warning messages.
Aliases:waMicrosoft Learn reference -
-InformationAction(System.Management ) #.Automation .Action Preference Choose how this command handles information messages.
Aliases:infaMicrosoft Learn reference -
-ProgressAction(System.Management ) #.Automation .Action Preference Choose how this command handles progress updates.
Aliases:progaMicrosoft Learn reference -
-ErrorVariable(System.String ) #Store the command's error records in the named variable.
Aliases:evMicrosoft Learn reference -
-WarningVariable(System.String ) #Store the command's warning records in the named variable.
Aliases:wvMicrosoft Learn reference -
-InformationVariable(System.String ) #Store the command's information records in the named variable.
Aliases:ivMicrosoft Learn reference -
-OutVariable(System.String ) #Save output in the named variable while passing it down the pipeline.
Aliases:ovMicrosoft Learn reference -
Buffer output before passing it to the next pipeline command.
Aliases:obMicrosoft Learn reference -
-PipelineVariable(System.String ) #Make the most recent output object available through a named variable within the pipeline.
Aliases:pvMicrosoft Learn reference
-
- Returns
-
System.Boolean: True for a valid declaration; False after a nonterminating validation error.
Discussed in Workspace guide