LibTmux.Remove-TmuxSession
LibTmux\Remove-TmuxSession Remove an explicit native session without emitting an object.
Source and package
- Declared in
- LibTmux
- Package
- LibTmux
- Source
- src/LibTmux.PowerShell/RemoveTmuxSessionCommand.cs
- Remove-TmuxSession [-Session] <Lib
Tmux > [-What.Session If ] [-Confirm] [<CommonParameters >] -
Description#
Remove the supplied native
LibTmux.Session. The endpoint and daemon generation come from that handle. Windows linked into another session survive; windows owned only by the removed session and their panes are destroyed. Removing the last session can stop the daemon when its configuration requires that.This high-impact operation requests confirmation by default.
WhatIfperforms no acquisition or mutation. Cancellation does not restore removed resources.Notes
Failures use
Tmux.SessionRemoveFailedand 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.Session: A nativeLibTmux.Sessionselected from an explicit endpoint. - Outputs
System.Void
Examples#
Example 1 Remove the previously selected native
$sessionfrom an endpoint you own. This example explicitly suppresses confirmation; omittingConfirmuses the normal high-impact confirmation behavior. View sourceTerminal window $session | LibTmux\Remove-TmuxSession -Confirm:$false- Parameters
-
-
The native session to remove. Select it explicitly using
Get-TmuxSessionon the endpoint you intend to change.- 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 Check command completion , Create windows and panes , Wait for a service · Remove sessions, windows and panes