Core Library0.xAPI reference

Choose documentation 2

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

cmdlet libtmux-powershell

LibTmux.New-TmuxWindowLink

Link a window into another session.

Source and package
Qualified name
LibTmux\New-TmuxWindowLink
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
Parameters
Common parameters 12

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

Returns

None: No success objects are emitted.

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

Same owner

containment 1 of 58 shown

Other members of LibTmux whose names share New-TmuxWindowLink. They sit on the same type; that does not make them behave alike.

All 58 members of LibTmux

Recorded calls

source calls
No call edges in the PowerShell model.

The PowerShell reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls LibTmux\New-TmuxWindowLink.

tmux command

task material

The tmux commands behind New-TmuxWindowLink.

tmux C API

task material

The C declarations in tmux that implement these commands.

Esc
Search in

Type to search.

Reference previewOpen reference