tio/src
yabu76 d1ff5f7142 Add multipul patterns function to Lua API tio.expect()
Lua regular expressions do not have an OR specification, so the current
tio.expect() cannot wait until any of multiple patterns match.

This will cause OR waiting behavior when a table of multiple regular
expressions is passed as a pattern.
If you pass a string as a pattern, it will treats a table has single
regular expression.

and this will change return values.
1st: table of captures if one of the patterns matched
     nil if any pattern unmatched and timeout.
2nd: whole input strings
3rd: index of the matched pattern. 0 if unmatched.

For example,
    captures, whole, idx = tio.expect( {"\nOK", "\nERROR"} )
    captures, whole, idx = tio.expect( "\nOK" )
2025-10-05 20:43:06 +09:00
..
bash-completion Add --complete-profiles to help printout and man pages 2025-06-17 16:30:31 +02:00
alert.c Clean up includes 2024-05-11 10:50:01 +02:00
alert.h Replace inih with glib key file parser 2024-05-02 18:35:37 +02:00
configfile.c Add option '--output-line-delay-char cr|lf' 2025-10-05 15:25:47 +09:00
configfile.h List available profiles in --list output 2024-05-03 11:35:48 +02:00
error.c + Add system timestamps to lua read() and new lua read_line() per global options 2024-11-07 21:45:06 +01:00
error.h Replace inih with glib key file parser 2024-05-02 18:35:37 +02:00
fs.c Fix uptime on MacOS 2024-07-09 22:12:42 +02:00
fs.h Add new ways to manage serial devices 2024-04-26 22:19:22 +02:00
log.c + Add system timestamps to lua read() and new lua read_line() per global options 2024-11-07 21:45:06 +01:00
log.h Update text 2024-04-12 13:03:51 +02:00
main.c Adjust code style to comply with clang-format rules 2025-08-14 13:50:58 +09:00
meson.build Disable compiler warning on unused result 2025-05-31 19:43:11 +02:00
misc.c Fix incorrect handling of the return value of the poll system call 2025-08-15 21:38:00 +09:00
misc.h Fix memory leak in base62_encode() 2024-10-25 18:26:59 +02:00
options.c Add option '--output-line-delay-char cr|lf' 2025-10-05 15:25:47 +09:00
options.h Add option '--output-line-delay-char cr|lf' 2025-10-05 15:25:47 +09:00
print.c Improve listing of long device names 2024-07-02 17:41:49 +02:00
print.h Improve listing of long device names 2024-07-02 17:41:49 +02:00
readline.c Adjust code style to comply with clang-format rules 2025-08-14 13:50:58 +09:00
readline.h Fix line input mode ignoring characters ABCD 2024-06-27 18:54:19 +02:00
rs485.c Fix includes 2024-05-13 10:57:27 +02:00
rs485.h Update text 2024-04-12 13:03:51 +02:00
script.c Add multipul patterns function to Lua API tio.expect() 2025-10-05 20:43:06 +09:00
script.h Prompt for Lua script or shell command in interactive session 2024-06-01 16:23:51 +02:00
setspeed.c Update text 2024-04-12 13:03:51 +02:00
setspeed.h Update text 2024-04-12 13:03:51 +02:00
signals.c Update text 2024-04-12 13:03:51 +02:00
signals.h Update text 2024-04-12 13:03:51 +02:00
socket.c Fix socket send call on platforms without MSG_NOSIGNAL 2024-07-20 08:25:49 +02:00
socket.h Update text 2024-04-12 13:03:51 +02:00
timestamp.c Added timestamp format "epoch-usec" 2025-05-23 16:36:39 +02:00
timestamp.h Added timestamp format "epoch-usec" 2025-05-23 16:36:39 +02:00
tty.c Add option '--output-line-delay-char cr|lf' 2025-10-05 15:25:47 +09:00
tty.h Add Lua API twrite 2025-09-23 19:15:30 +09:00
version.h.in Rename git version to simply version 2024-11-30 11:37:27 +01:00
xymodem.c Add Xmodem-SUM support. 2025-08-16 10:52:31 +09:00
xymodem.h Add Xmodem-SUM support. 2025-08-16 10:52:31 +09:00