Core Library0.xAPI Reference

Choose documentation 2

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

cmdlet libtmux-powershell latest

LibTmux.Remove-TmuxSession

Remove an explicit native session without emitting an object.

Source and package
Qualified name
LibTmux\Remove-TmuxSession
Declared in
LibTmux
Package
LibTmux
Source
src/LibTmux.PowerShell/RemoveTmuxSessionCommand.cs

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. WhatIf performs no acquisition or mutation. Cancellation does not restore removed resources.

Notes

Failures use Tmux.SessionRemoveFailed and retain the original core exception, its dispatch information and the failed owner. ErrorAction Continue permits later owners to be processed; ErrorAction Stop 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 -WhatIf and -Confirm; confirm impact: High.
Positional binding
Enabled.
Pipeline inputs
LibTmux.Session: A native LibTmux.Session selected from an explicit endpoint.
Outputs
System.Void

Examples#

Example 1 Remove the previously selected native $session from an endpoint you own. This example explicitly suppresses confirmation; omitting Confirm uses the normal high-impact confirmation behavior. View source

Terminal window
$session | LibTmux\Remove-TmuxSession -Confirm:$false
Parameters
Common parameters 12

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

Returns

None: No success objects are emitted. An empty input pipeline performs no work.

tmux command#

The tmux commands behind Remove-TmuxSession.

tmux C API#

The C declarations in tmux that implement these commands.

Guides#

Pages that discuss Remove-TmuxSession.

Esc

Type to search.

Reference previewOpen reference