Pane.RunAsync
Runs a shell command in the pane and waits for its exit status.
Source and package
- Module
- LibTmux
- Declared in
- Pane
- Package
- LibTmux
- Source
- src/LibTmux/Pane.Running.cs
- RunAsync ( command : string , timeout : Time
Span , cancellationToken : CancellationToken ) Task<PaneRun > ( request : PaneResult Run , cancellationToken : CancellationRequest Token ) Task<PaneRun >Result -
- Parameters
-
-
command ( string ) – The shell command. (for
RunAsync(command, timeout, cancellationToken)) -
timeout ( Time
Span ) – How long to wait for it. (forRunAsync(command, timeout, cancellationToken)) -
cancellationToken ( Cancellation
Token ) – Stops waiting. A command already sent keeps running, so cancelling then raisesLibTmuxExceptionsaying it may have run, notOperationCanceledException, whichWaitand F#'sAsync.AwaitTaskreplace with a bareTaskCanceledException. -
request ( Pane
Run ) – The command and how long to wait. (forRequest RunAsync(request, cancellationToken))
-
- Returns
-
The exit status and what the command printed.
- Raises
-
-
Argument
Exception –commandis blank. (forRunAsync(command, timeout, cancellationToken)) -
Tmux
Pane – The pane is not at a POSIX shell, is in a mode, or its program has exited; or it changed during every read before the command was sent.Exception -
Tmux
Object – tmux no longer has the pane.Not Found Exception -
Lib
Tmux – The command's result could not be read, or its private files could not be deleted; inspect the failure before retrying.Exception -
Argument
Out – The timeout or output budget is invalid. (forOf Range Exception RunAsync(request, cancellationToken))
-