LibTmux.Remove-TmuxWindow
LibTmux\Remove-TmuxWindow Remove a physical window and all its session links.
Source and package
- Declared in
- LibTmux
- Package
- LibTmux
- Source
- src/LibTmux.PowerShell/RemoveTmuxWindowCommand.cs
- Remove-TmuxWindow [-Window] <Lib
Tmux > [-What.Window If ] [-Confirm] [<CommonParameters >] -
Description#
Remove the supplied native
LibTmux.Windowfrom every session that links it, including repeated links in the same session. This destroys its panes. To remove only one session placement, useRemove-TmuxWindowLink; this command always kills the physical window.The endpoint and daemon generation come from the native handle. This high-impact operation requests confirmation by default.
WhatIfperforms no acquisition or mutation. Cancellation does not restore removed resources.Notes
Failures use
Tmux.WindowRemoveFailedand retain the original core exception, its dispatch information and the failed owner.ErrorActionContinue permits later owners to be processed;ErrorActionStop stops on the first failure. A missing target remains an error. No mutation is retried. Previously captured handles retain their old data after removal and are not refreshed in place.Command details#
- Command type
cmdlet- Confirmation
- Supports
-WhatIfand-Confirm; confirm impact: High. - Positional binding
- Enabled.
- Pipeline inputs
-
LibTmux.Window: A nativeLibTmux.Windowselected from an explicit endpoint. - Outputs
System.Void
Examples#
Example 1 Remove the previously selected native
$windowfrom an endpoint you own. This example explicitly suppresses confirmation; omittingConfirmuses the normal high-impact confirmation behavior. View sourceTerminal window $window | LibTmux\Remove-TmuxWindow -Confirm:$false- Parameters
-
-
The native physical window to remove from every session. A handle acquired through one session still identifies the shared physical window.
- Required
- Yes
- Position
- 0
- Pipeline input
- By value
- Validation
ValidateNotNull()
-
-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. An empty input pipeline performs no work.
Discussed in Remove sessions, windows and panes