LibTmux.Disconnect-TmuxControl
LibTmux\Disconnect-TmuxControl Dispose an explicitly supplied tmux control client.
Source and package
- Declared in
- LibTmux
- Package
- LibTmux
- Source
- src/LibTmux.PowerShell/DisconnectTmuxControlCommand.cs
- Disconnect-TmuxControl [-Connection] <Lib
Tmux > [-What.IControl Mode Session If ] [-Confirm] [<CommonParameters >] -
Description#
Dispose the native control client and await its cleanup. The tmux daemon, sessions and panes remain running. This is an explicit ownership action: other callers using the same connection lose that client.
The operation emits no success object. An empty pipeline performs no work.
WhatIfleaves the connection usable.Notes
Tmux.ControlDisconnectFailedretains the native failure and connection target. The native disposal API has no cancellation token; cleanup is awaited rather than abandoned when a pipeline stops.Command details#
- Command type
cmdlet- Confirmation
- Supports
-WhatIfand-Confirm; confirm impact: Medium. - Positional binding
- Enabled.
- Pipeline inputs
-
LibTmux.IControlModeSession: The client the caller explicitly chooses to close.
Examples#
Example 1 Close the
$controlclient owned by the surrounding scope; use this in finally. View sourceTerminal window $control | LibTmux\Disconnect-TmuxControl -Confirm:$false- Parameters
-
-
-Connection(LibTmux ) #.IControl Mode Session The native control client. This operation borrows the supplied client.
- Required
- Yes
- Position
- 0
- Pipeline input
- By value
- Validation
ValidateNotNull()
-
-WhatIf(System.Management ) #.Automation .Switch Parameter Show the operation without contacting tmux.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
- Aliases
wi
-
-Confirm(System.Management ) #.Automation .Switch Parameter Ask for confirmation before the operation.
- 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 output.
Discussed in Commands and control clients · Ownership and cleanup