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.Move-TmuxWindow

LibTmux\Move-TmuxWindow LibTmux\Move-TmuxWindow

Move one session placement of a window.

Source and package
Declared in
LibTmux
Package
LibTmux
Source
src/LibTmux.PowerShell/MoveTmuxWindowCommand.cs

Description#

Move only the placement captured in the source Window handle. Other links to the same physical window remain in their sessions. Omit DestinationSession to move within the source session. Omit Index to let tmux use the next free index in the destination. A supplied destination Session must belong to the same endpoint and daemon generation as the Window .

With PassThru, return a new Window handle containing the observed destination placement. The original handle remains unchanged and is stale after a move. Without PassThru, emit no success object. Confirmation is requested by default because ReplaceExisting can remove a destination window. WhatIf performs no tmux I/O.

Notes

The core checks captured source placement and server generation before the move. A stale placement, tmux rejection or failed readback writes a per-input Tmux.WindowMoveFailed error. Readback failure after dispatch has unknown final state; inspect topology before deciding whether to retry. ErrorAction Continue permits later inputs; ErrorAction Stop stops at the first failure.

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
LibTmux.Window

Examples#

Example 1 Move the previously selected $window to index 5 in its own session and emit the replacement handle. Assign the output for subsequent operations. View source

Terminal window
$window | LibTmux\Move-TmuxWindow -Index 5 -PassThru -Confirm:$false
Parameters
Common parameters 12

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

Returns

LibTmux.Window : One replacement Window per successful input when PassThru is present; otherwise no success output.

Esc

Type to search.

Reference preview Open reference