IControlModeSession.SendAsync
Runs one command on this client and reads what it answered.
Source and package
- Module
- LibTmux
- Declared in
- IControlModeSession
- Package
- LibTmux
- Source
- src/LibTmux/ControlMode/IControlModeSession.cs
- SendAsync ( command : Tmux
Command , cancellationToken : CancellationToken ) Task<IReadOnly <string>>List -
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. UseRunShellAsyncto read shell text where tmux returns it. A nonzero shell exit raisesTmuxCommandException;Resultcarries its exit status.- Parameters
-
-
command ( Tmux
Command ) – The typed command to run. -
cancellationToken ( Cancellation
Token ) – Stops waiting for the answer.
-
- Returns
-
The lines tmux printed, empty when it printed nothing.
- Raises
-
-
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 -
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
-