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
- Move-TmuxWindow [-Window] <Lib
Tmux > [-Destination.Window Session <LibTmux >] [-Index <System.Session .Nullable [System.Int32 ]>] [-Direction <System.Nullable [LibTmux ]>] [-No.Window Direction Select ] [-ReplaceExisting ] [-PassThru ] [-WhatIf ] [-Confirm] [<CommonParameters >] -
Description#
Move only the placement captured in the source
Windowhandle. 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 destinationSessionmust belong to the same endpoint and daemon generation as theWindow.With PassThru, return a new
Windowhandle 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.WhatIfperforms 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.WindowMoveFailederror. Readback failure after dispatch has unknown final state; inspect topology before deciding whether to retry.ErrorActionContinue permits later inputs;ErrorActionStop stops at the first failure.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
-
LibTmux.Window
Examples#
Example 1 Move the previously selected
$windowto index 5 in its own session and emit the replacement handle. Assign the output for subsequent operations. View sourceTerminal window $window | LibTmux\Move-TmuxWindow -Index 5 -PassThru -Confirm:$false- Parameters
-
-
The native source placement, supplied directly or through the pipeline.
- Required
- Yes
- Position
- 0
- Pipeline input
- By value
- Validation
ValidateNotNull()
-
-DestinationSession(LibTmux ) #.Session Move into this native session. Omit it to use the source
Window's captured session. A different endpoint or daemon generation is rejected before tmux dispatch.- Required
- No
- Position
- Named
- Pipeline input
- No
- Validation
ValidateNotNull()
-
-Index(System.Nullable [System.Int32 ]) #The destination session's window index, at least 0. Omit it to use the next free index.
- 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 window relative to the destination session's current window.- Required
- No
- Position
- Named
- Pipeline input
- No
-
-NoSelect(System.Management ) #.Automation .Switch Parameter Leave the moved window unselected in the destination session.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-ReplaceExisting(System.Management ) #.Automation .Switch Parameter Replace a link already at the requested destination index. This may destroy the displaced window if it had no other links.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-PassThru(System.Management ) #.Automation .Switch Parameter Emit a new
Windowhandle with the destination placement read back after tmux accepts the move. A failed readback does not mean the move was rolled back.- 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
-
LibTmux.Window:OnereplacementWindowper successful input when PassThru is present; otherwise no success output.