diff --git a/NEWS b/NEWS index 8b2eae4..0a467da 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,36 @@ -=== tio v3.7 (2024-08-31) === +=== tio v3.8 (2024-11-30) === + + +Changes since tio v3.7 (2024-08-31): + + * Rename git version to simply version + + * Clean up lua API + + Rename modem_send() to send() + Rename send to write() + + * Zero initialize buffer in read_string() + + * Use version from git + + * Fix memory leak in base62_encode() + + * Fix name declaration conflict with socket send() + + * Add clang-format spec + +Keith Hill: + + + Add system timestamps to lua read() and new lua read_line() per global options + + Add missing timestamp-format epoch + + Update send_ to use fsync and tcdrain like normal tty_sync does + + Rework read_line to save partial line at timeout + + Simplified read_line to reduce cyclomatic complexity + + renamed example files read.lua and read_line.lua + + moved #define READ_LINE_SIZE to top of file + + renamed g_linebuf to linebuf, and moved it into read_line as a static variable diff --git a/README.md b/README.md index 0f1a0aa..9d639fe 100644 --- a/README.md +++ b/README.md @@ -359,7 +359,7 @@ color = 11 [svf2] device = /dev/ttyUSB0 baudrate = 9600 -script = expect("login: "); send("root\n"); expect("Password: "); send("root\n") +script = expect("login: "); write("root\n"); expect("Password: "); write("root\n") color = 12 [esp32] diff --git a/man/tio.1.in b/man/tio.1.in index 9d75c45..b27f299 100644 --- a/man/tio.1.in +++ b/man/tio.1.in @@ -722,7 +722,7 @@ expect -i $uart "prompt> " .TP It is also possible to use tio's own simpler expect/send script functionality to e.g. automate logins: -$ tio --script 'expect("login: "); send("root\\n"); expect("Password: "); send("root\\n")' /dev/ttyUSB0 +$ tio --script 'expect("login: "); write("root\\n"); expect("Password: "); write("root\\n")' /dev/ttyUSB0 .TP Redirect device I/O to network file socket for remote TTY sharing: