Core LibraryAPI Reference

Choose documentation 1

latest

Current version

latest
English

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

function libtmux-fsharp latest

Control.watchPane

Namespace LibTmux.FSharp.Control.watchPane LibTmux.FSharp

Streams one pane's output from a borrowed control client.

View as Markdown

Source and package
Module
LibTmux.FSharp
Declared in
Control
Package
LibTmux.FSharp
Source
src/LibTmux.FSharp/Control.fsi
F# value signatures Declares the name and type of a value or function in a signature. Language documentation watchPane: pane: LibTmux.Pane -> session: IControlModeSession -> IAsyncEnumerable<TmuxEvent>
function [source]

Description#

The stream ends with <c>TmuxPaneGoneEvent</c> once the pane is confirmed gone, or with <c>TmuxExitEvent</c> when the client ends. <c>TmuxPanePausedEvent</c> and <c>TmuxPaneContinuedEvent</c> bracket output a slow reader missed. It reads the client's single event stream, so other events are consumed and dropped; follow several panes through one client with <c>watchPanes</c>. Match what it yields with <c>PaneWatch</c>.

tmux discards output it has not yet sent once a pane's program exits, so the last lines of a program that exits at once may never arrive. Read final output with <c>Pane.run</c>, or capture a pane kept with <c>remain-on-exit</c>.

Parameters
Raises
  • System.ArgumentException – The pane is not in the session the client is attached to; tmux sends a control client output only from that session.

  • System.InvalidOperationException – The pane's window left the client's session while it was watched, so tmux sends none of its output any more.

Discussed in Getting started , Quick start , Streams and cleanup

Esc

Type to search.