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.Disconnect-TmuxControl

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

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. WhatIf leaves the connection usable.

Notes

Tmux.ControlDisconnectFailed retains 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 -WhatIf and -Confirm ; confirm impact: Medium.
Positional binding
Enabled.
Pipeline inputs
LibTmux.IControlModeSession : The client the caller explicitly chooses to close.

Examples#

Example 1 Close the $control client owned by the surrounding scope; use this in finally. View source

Terminal window
$control | LibTmux\Disconnect-TmuxControl -Confirm:$false
Parameters
Common parameters 12

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

Returns

None: No success output.

Discussed in Commands and control clients · Ownership and cleanup

Esc

Type to search.

Reference preview Open reference