IControlModeSession.SendAsync
Runs one command on this client and reads what it answered.
Source and package
- Qualified name
-
LibTmux .IControl Mode Session. Send Async - Namespace
- LibTmux
- Declared in
IControlModeSession- Package
- LibTmux
- Source
- src/LibTmux/ControlMode/IControlModeSession.cs
- Task<IRead
Only <string>> SendAsync( TmuxList Command command, CancellationToken cancellationToken = default ) -
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, andrunare rejected before dispatch because their output is not framed as a command reply. Only direct background shell invocations are accepted. UseRunShellAsync()to read shell text where tmux returns it. A nonzero shell exit raisesTmuxCommandException;Resultcarries its exit status.- Parameters
-
-
command(TmuxCommand ) – The typed command to run. -
cancellationToken(CancellationToken ) – Stops waiting for the answer.Default
default
-
- Returns
-
The lines tmux printed, empty when it printed nothing.
- Errors
-
-
Control
Mode – Tmux reported the command failed.Command Exception -
Argument
Exception – The rendered command is too large for one bounded request. -
Stale
Server – The command targets a different tmux server generation.Generation Exception -
Tmux
Version – The server's release cannot survive the command, as an unnamedToo Low Exception break-paneon tmux 3.7 cannot. The command is checked as the one-shot methods check theirs, by its alias, name or unique prefix and one command at a time in a;list; nothing is sent. A tmux command nested inif-shell,run-shell -Cor a brace block is not read, so do not nest one that is refused. -
Not
Supported – The command is aException run-shellorruninvocation without an unambiguous direct background shell option. -
Invalid
Operation – The client is no longer running or has too many unanswered commands.Exception
-
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.IControlModeSession.SendAsync.