Window.UnlinkAsync
Removes this window's link to the session it was read through.
Source and package
- Qualified name
-
LibTmux .Window. Unlink Async - Namespace
- LibTmux
- Declared in
Window- Package
- LibTmux
- Source
- src/LibTmux/Window.Links.cs
- Task UnlinkAsync( bool kill
If = false, CancellationLast Token cancellationToken = default )Task UnlinkAsync( bool killIf , IReadLast Only <PaneList Id > expectedPane , CancellationIds Token cancellationToken = default ) -
Description
tmux refuses to unlink a window that belongs to only one session unless it is allowed to destroy it. A guard in the native queue checks the captured session/index still names this window before unlinking it.
- Parameters
-
-
killIfLast(bool) – Whether the window dies when this was its last link. forUnlinkAsync(killIfLast, cancellationToken)Default
false -
cancellationToken(CancellationToken ) – Cancels the tmux command.Default
default -
killIfLast(bool) – Whether the window dies when this was its last link. forUnlinkAsync(killIfLast, expectedPaneIds, cancellationToken) -
expectedPaneIds(IReadOnly <PaneList Id >) – The nonempty, distinct pane IDs expected in the window, in any order. forUnlinkAsync(killIfLast, expectedPaneIds, cancellationToken)
-
- Errors
-
-
Argument
Exception – The IDs are empty, duplicated, or exceed the native command byte budget. forUnlinkAsync(killIfLast, expectedPaneIds, cancellationToken) -
Tmux
Command – The placement or pane membership changed, or tmux refused the unlink. forException UnlinkAsync(killIfLast, expectedPaneIds, cancellationToken)
-
Recorded calls
source callsThe C# reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls LibTmux.Window.UnlinkAsync.
tmux command
task materialThe tmux commands behind UnlinkAsync.
tmux C API
task materialThe C declarations in tmux that implement these commands.
In other ports
task equivalence 12 other ports mappedSource-verified mappings for Unlink a window from a session. A mapping says these APIs perform the same task. It does not say they share defaults, errors or completion: check each page.
| Port | API | Differs from C# |
|---|---|---|
| C# | Lib Removes this window's link to the session it was read through. | This page |
| Python | libtmux Unlink this window from the current session via $ tmux unlink-window. | None recorded in the model |
| Lua | libtmux | on WindowLink |
| Erlang | tmux Remove one checked membership. force defaults false, retaining tmux's protection for windows linked to only one session. force = true permits removing the last link, destroying that physical window and possibly its session. Duplicate links within one session retain tmux's native protection rules. Performs I/O and returns the command result without refreshing rows. | free function Acts on one session-relative membership. |
| TypeScript | window Remove this placement, leaving the window's other placements intact. | None recorded in the model |
| Rust | window Remove this session's link to the window, leaving other links intact. | async |
| Go | tmux Unlink removes the receiver's exact session winlink without refreshing the materialized receiver. Without KillIfLast, tmux rejects removal of a stable window's only link; with it, that window is destroyed. A transport or context error can be delivery-ambiguous; the void result cannot carry partial identity and no rollback is attempted. | None recorded in the model |
| Java | io Removes this link, leaving the window wherever else it is linked. | None recorded in the model |
| C++ | libtmux:: Stop showing it in the session this value came from. | readonly |
| Swift | Server Removes one of a linked window's appearances. The window survives while any session still holds it. | asyncon Server |
| OCaml | Libtmux Without allow_kill, tmux rejects removal of the last link to a window. | free function |
| Perl | Lib unlink_window(link => WindowLink|session_id:index). | on Server Requires an explicit WindowLink or session_id:index context; a physical window alone does not select a session placement. |
| Raku | Lib Remove this placement and its grouped-session peers; kill-last permits the last link. | on WindowLinkRef |
No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
No equivalent is recorded in Ruby, PowerShell, Julia, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.