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\Resolve-TmuxWorkspace

File: Resolve-TmuxWorkspace -File <System.IO.FileInfo> [-Variables <System.Collections.IDictionary>] [<CommonParameters>] Path: Resolve-TmuxWorkspace -LiteralPath <System.String> [-Variables <System.Collections.IDictionary>] [<CommonParameters>] Workspace (default): Resolve-TmuxWorkspace [-Workspace] <LibTmux.Workspace.WorkspaceFile> -BaseDirectory <System.String> [-Variables <System.Collections.IDictionary>] [<CommonParameters>]

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.InvalidWorkspaceVariables before processing input. File and resolution failures retain their native exception under Tmux.WorkspaceResolutionFailed ; ErrorAction Continue 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).Path
Variables = @{ PROJECT = 'src' }
}
LibTmux.Workspace\Import-TmuxWorkspace -Yaml @'
session_name: development
start_directory: "${PROJECT}"
windows:
- panes: [null]
'@ | LibTmux.Workspace\Resolve-TmuxWorkspace @resolve
Parameters
Common parameters 12

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

Returns

LibTmux.Workspace.WorkspaceFile: The replacement declaration with document-directory provenance.

Esc

Type to search.

Reference preview Open reference