LibTmux.Workspace\Resolve-TmuxWorkspace
- File: Resolve-TmuxWorkspace -File <System
.IO > [-Variables <System.File Info .Collections >] [<Common.IDictionary Parameters >] Path: Resolve-TmuxWorkspace -LiteralPath <System.String > [-Variables <System.Collections >] [<Common.IDictionary Parameters >] Workspace (default): Resolve-TmuxWorkspace [-Workspace] <LibTmux.Workspace.WorkspaceFile> -BaseDirectory <System.String > [-Variables <System.Collections >] [<Common.IDictionary Parameters >] -
Resolve inherited workspace paths against an explicit document base.
Description#
Return a replacement native declaration with resolved inherited directories and option values. A parsed WorkspaceFile requires an explicit BaseDirectory. LiteralPath and File read a bounded, seekable UTF-8 YAML/JSON file and use its absolute parent as the base. Paths use the FileSystem provider without wildcard expansion. Malformed declarations and invalid UTF-8 retain their native exceptions as InvalidData errors.
Expansion uses only the supplied case-sensitive string map. Supply HOME for home-directory expansion in paths; no process environment is copied implicitly. Dollar pairs represent a literal dollar sign in declaration paths and option values.
Session, window and pane option values expand supplied variables; unknown variables in option values remain literal. Unresolved path variables are errors. Option names, command text, the host script, session and window names, and environment values remain literal. Resolution does not execute scripts, inspect tmux or require the resulting directories to exist. The input declaration remains unchanged.Notes
Invalid variable maps terminate with
Tmux.InvalidWorkspaceVariablesbefore processing input. File and resolution failures retain their native exception underTmux.WorkspaceResolutionFailed;ErrorActionContinue permits later input.Command details#
- Command type
cmdlet- Default parameter set
-
Workspace - Positional binding
- Enabled.
- Pipeline inputs
LibTmux.Workspace.WorkspaceFile: A declaration used with BaseDirectory.;System.IO.FileInfo: A declaration file to read and resolve.- Outputs
LibTmux.Workspace.WorkspaceFile
Examples#
Example 1 Resolve a parsed declaration against the current filesystem directory. Pass a different explicit BaseDirectory when the declaration came from elsewhere. View source
Terminal window $resolve = @{BaseDirectory = (Get-Location).PathVariables = @{ PROJECT = 'src' }}LibTmux.Workspace\Import-TmuxWorkspace -Yaml @'session_name: developmentstart_directory: "${PROJECT}"windows:- panes: [null]'@ | LibTmux.Workspace\Resolve-TmuxWorkspace @resolve- Parameters
-
-
-File(System.IO ) (for.File Info File) #A
FileInfowhose parent becomes the document base.- Required
- Yes
- Position
- Named
- Pipeline input
- By value
- Validation
ValidateNotNull()
-
-Variables(System.Collections ) #.IDictionary Allowed string expansion variables. Values requiring conversion are rejected.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Validation
ValidateNotNull()
-
-LiteralPath(System.String ) (forPath) #The literal declaration path. The file parent becomes its document base.
- Required
- Yes
- Position
- Named
- Pipeline input
- No
- Validation
ValidateNotNullOrEmpty()
-
-Workspace(LibTmux.Workspace.WorkspaceFile) (forWorkspace) #The parsed declaration to resolve without reading a file.
- Required
- Yes
- Position
- 0
- Pipeline input
- By value
- Validation
ValidateNotNull()
-
-BaseDirectory(System.String ) (forWorkspace) #The explicit filesystem base for a parsed declaration. Relative bases resolve against the current PowerShell location.
- Required
- Yes
- Position
- Named
- Pipeline input
- No
- Validation
ValidateNotNullOrEmpty()
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
-
LibTmux.Workspace.WorkspaceFile: The replacement declaration with document-directory provenance.