Core LibraryAPI 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.

cmdlet libtmux-powershell latest

LibTmux.New-TmuxWindowLink

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

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 Window handle stays a capture of the source placement. Confirmation is requested by default because ReplaceExisting can remove a destination window. WhatIf performs no tmux I/O.

Notes

A stale source placement or missing destination writes a per-input Tmux.WindowLinkFailed error. ErrorAction Continue processes later windows; ErrorAction Stop 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 -WhatIf and -Confirm ; confirm impact: High.
Positional binding
Enabled.
Pipeline inputs
LibTmux.Window : One native source placement per pipeline input.
Outputs
System.Void

Examples#

Example 1 Link the previously selected $window into $guest at index 5 without selecting it. Both handles must come from the same tmux server generation. View source

Terminal window
$link = @{ Session = $guest; Index = 5; NoSelect = $true; Confirm = $false }
$window | LibTmux\New-TmuxWindowLink @link
Parameters
Common parameters 12

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

Returns

None: No success objects are emitted.

Esc

Type to search.

Reference preview Open reference