Pane.SendTextAndWaitAsync
Types a line, presses Enter, and waits for a later line to contain the text.
Source and package
- Module
- LibTmux
- Declared in
- Pane
- Package
- LibTmux
- Source
- src/LibTmux/Pane.Waiting.cs
- SendTextAndWaitAsync ( line : string , text : string , timeout : Time
Span , cancellationToken : CancellationToken ) Task<PaneWait >Result -
Description#
SendKeysAndWaitAsyncwithSendTextAsync's keys: the screen before the line is typed never ends the wait, and the line's echo is discounted. The typed line may be at most 65536 UTF-8 bytes so echo projection fits within the wait's work budget.- Parameters
-
-
line ( string ) – The line to type, sent verbatim.
-
text ( string ) – The text to wait for, matched literally.
-
timeout ( Time
Span ) – How long to wait, counted from the call. -
cancellationToken ( Cancellation
Token ) – Stops the wait; a line already sent stays sent.
-
- Returns
-
How the wait ended.
- Raises
-
-
Argument
Null –Exception lineis null. -
Argument
Exception – The match text is empty or spans lines, or the typed line exceeds 65536 UTF-8 bytes. -
Argument
Out – The timeout is negative or longer than 49 days.Of Range Exception -
IOException – Echo projection exceeds its bounded work.
-
Regex
Match – Echo matching exceeds its finite regex time.Timeout Exception -
Tmux
Pane – The pane's program had already exited, or the pane changed during every read until the timeout, so nothing was sent.Exception -
Tmux
Object – tmux no longer has the pane.Not Found Exception -
Lib
Tmux – The line was typed but Enter failed. The pane may already have acted on it; do not retry the whole call.Exception
-