LibTmux.New-TmuxWindowLink
LibTmux\New-TmuxWindowLink Link a window into another session.
Source and package
- Declared in
- LibTmux
- Package
- LibTmux
- Source
- src/LibTmux.PowerShell/NewTmuxWindowLinkCommand.cs
- New-TmuxWindowLink [-Window] <Lib
Tmux > -Session <Lib.Window Tmux > [-Index <System.Session .Nullable [System.Int32 ]>] [-Direction <System.Nullable [LibTmux ]>] [-Replace.Window Direction Existing ] [-NoSelect ] [-WhatIf ] [-Confirm] [<CommonParameters >] -
Description#
Link a captured window placement into a native destination
Session. The source handle must name a current session-relative link. The destination must belong to the same endpoint and daemon generation. An existing link at the requested index is an error unless ReplaceExisting is present.This command does not emit a new placement. Read the destination session's windows to work with its new link. The original
Windowhandle stays a capture of the source placement. Confirmation is requested by default because ReplaceExisting can remove a destination window.WhatIfperforms no tmux I/O.Notes
A stale source placement or missing destination writes a per-input
Tmux.WindowLinkFailederror.ErrorActionContinue processes later windows;ErrorActionStop stops on the first failure. The core checks source placement and server generation in tmux's native queue before mutating. Do not retry an already dispatched mutation without observing current topology.Command details#
- Command type
cmdlet- Confirmation
- Supports
-WhatIfand-Confirm; confirm impact: High. - Positional binding
- Enabled.
- Pipeline inputs
-
LibTmux.Window:Onenative source placement per pipeline input. - Outputs
System.Void
Examples#
Example 1 Link the previously selected
$windowinto$guestat index 5 without selecting it. Both handles must come from the same tmux server generation. View sourceTerminal window $link = @{ Session = $guest; Index = 5; NoSelect = $true; Confirm = $false }$window | LibTmux\New-TmuxWindowLink @link- Parameters
-
-
The native source placement, supplied directly or through the pipeline. A physical window linked into multiple sessions has a distinct
Windowhandle for each placement.- Required
- Yes
- Position
- 0
- Pipeline input
- By value
- Validation
ValidateNotNull()
-
The native destination session. Its endpoint and generation must match the source
Window.- Required
- Yes
- Position
- Named
- Pipeline input
- No
- Validation
ValidateNotNull()
-
-Index(System.Nullable [System.Int32 ]) #An index in the destination session, at least 0. Omit it to let tmux choose the placement.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Validation
ValidateRange(0, 2147483647)
-
-Direction(System.Nullable [LibTmux ]) #.Window Direction Insert Before or
Afterthe destination. Without Index, tmux places the link relative to the destination session's current window.- Required
- No
- Position
- Named
- Pipeline input
- No
-
-ReplaceExisting(System.Management ) #.Automation .Switch Parameter Replace a link already at the requested index. This may destroy the displaced window if it had no other links.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-NoSelect(System.Management ) #.Automation .Switch Parameter Leave the new link unselected in its destination session.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-WhatIf(System.Management ) #.Automation .Switch Parameter Runs the command in a mode that only reports what would happen without performing the actions.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
- Aliases
wi
-
-Confirm(System.Management ) #.Automation .Switch Parameter Prompts you for confirmation before running the cmdlet.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
- Aliases
cf
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
-
None: No success objects are emitted.