Core LibraryAPI Reference

Choose documentation 3

latest

Current version

latest
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

method libtmux-dotnet latest

Window.UnlinkAsync

Namespace LibTmux.Window.UnlinkAsync LibTmux

Removes this window's link to the session it was read through.

View as Markdown

Source and package
Module
LibTmux
Declared in
Window
Package
LibTmux
Source
src/LibTmux/Window.Links.cs
Other languages
Python Ruby LuaTypeScriptRustGoJavaC++Swift Kotlin Scala F#
UnlinkAsync ( killIfLast : bool , cancellationToken : CancellationToken ) → Task ( killIfLast : bool , expectedPaneIds : IReadOnlyList<PaneId> , cancellationToken : CancellationToken ) → Task
methodoverload2 overloads [source]

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.

  • cancellationToken ( CancellationToken ) – Cancels the tmux command.

  • expectedPaneIds ( IReadOnlyList<PaneId> ) – The nonempty, distinct pane IDs expected in the window, in any order. (for UnlinkAsync(killIfLast, expectedPaneIds, cancellationToken))

Raises
  • ArgumentException – The IDs are empty, duplicated, or exceed the native command byte budget. (for UnlinkAsync(killIfLast, expectedPaneIds, cancellationToken))

  • TmuxCommandException – The placement or pane membership changed, or tmux refused the unlink. (for UnlinkAsync(killIfLast, expectedPaneIds, cancellationToken))

tmux command unlink-window

In other ports Unlink a window from a session
Esc

Type to search.