mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Extend lua expect() to also return matched string
This commit is contained in:
parent
48c9e8a9a9
commit
3cc2d90fda
2 changed files with 18 additions and 2 deletions
|
|
@ -375,6 +375,11 @@ In addition to the Lua API tio makes the following functions available:
|
|||
Expect string - waits for string to match or timeout before continueing.
|
||||
Supports regular expressions. Special characters must be escaped with '\\\\'.
|
||||
Timeout is in milliseconds, defaults to 0 meaning it will wait forever.
|
||||
|
||||
Returns 1 on successful match, 0 on timeout, or -1 on invalid regular expression.
|
||||
|
||||
On successful match it also returns the match string as second return value.
|
||||
|
||||
.IP "\fBsend(string)"
|
||||
Send string.
|
||||
.IP "\fBmodem_send(file, protocol)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue