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

IControlModeSession.SendAsync

Namespace LibTmux.IControlModeSession.SendAsync LibTmux

Runs one command on this client and reads what it answered.

View as Markdown

Source and package
Module
LibTmux
Declared in
IControlModeSession
Package
LibTmux
Source
src/LibTmux/ControlMode/IControlModeSession.cs
SendAsync ( command : TmuxCommand , cancellationToken : CancellationToken ) → Task<IReadOnlyList<string>>
method [source]

Description#

tmux answers commands in the order it received them, so this is safe to call concurrently: each caller gets its own answer rather than someone else's. Cancelling stops the wait, not the command; tmux has already been told. Foreground run-shell, its tmux command-name prefixes, and run are rejected before dispatch because their output is not framed as a command reply. Only direct background shell invocations are accepted. Use RunShellAsync to read shell text where tmux returns it. A nonzero shell exit raises TmuxCommandException ; Result carries its exit status.

Parameters
Returns

The lines tmux printed, empty when it printed nothing.

Raises
Esc

Type to search.