LibTmux.Workspace\Import-TmuxWorkspace
- File: Import-TmuxWorkspace -File <System
.IO > [<Common.File Info Parameters >] Path (default): Import-TmuxWorkspace [-LiteralPath ] <System.String > [<CommonParameters >] Yaml: Import-TmuxWorkspace -Yaml <System.String > [<CommonParameters >] -
Parse a workspace declaration without executing it.
Description#
Read a literal filesystem path, a
FileInfopipeline or supplied YAML/JSON text into a native WorkspaceFile.Inputsmust be seekable UTF-8 files; a UTF-8 BOM is accepted. Named pipes are rejected without waiting for a writer. Admission stops at 1048576 characters, before retaining an oversized document. Malformed YAML/JSON and invalid UTF-8 preserve their exceptions as InvalidData errors.Parsing does not start tmux, execute host scripts or expand paths and variables.
Resolve-TmuxWorkspacesupplies an explicit document base and allowed variables.Test-TmuxWorkspacechecks declaration completeness and execution policy.A window can set
window_indexto a nonnegative session-relative index. Omit it for tmux's next free index. Duplicate requested indexes fail validation; an index already occupied in the session fails during application.Notes
File errors retain
Tmux.InvalidWorkspaceand allow later pipeline files withErrorActionContinue.ErrorActionStop terminates. No form applies a workspace.Command details#
- Command type
cmdlet- Default parameter set
- Path
- Positional binding
- Enabled.
- Pipeline inputs
-
System.IO.FileInfo: A file to read and parse. - Outputs
LibTmux.Workspace.WorkspaceFile
Examples#
Example 1 Inspect a declaration with a window at index 5 without starting tmux. View source
Terminal window LibTmux.Workspace\Import-TmuxWorkspace -Yaml @'session_name: developmentwindows:- window_name: editorwindow_index: 5panes: [null]'@- Parameters
-
-
-File(System.IO ) (for.File Info File) #A
FileInforeturned byGet-Itemor workspace discovery. Its path is literal.- Required
- Yes
- Position
- Named
- Pipeline input
- By value
- Validation
ValidateNotNull()
-
-LiteralPath(System.String ) (forPath) #The literal file path to read.
- Required
- Yes
- Position
- 0
- Pipeline input
- No
- Validation
ValidateNotNullOrEmpty()
-
-Yaml(System.String ) (forYaml) #YAML or JSON declaration text.
- 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: Native pipeline type for this command.