diff options
-rw-r--r-- | jim-aio.c | 2 | ||||
-rw-r--r-- | jim-tty.c | 16 | ||||
-rw-r--r-- | jim_tcl.txt | 5 |
3 files changed, 21 insertions, 2 deletions
@@ -1762,7 +1762,7 @@ static const jim_subcmd_type aio_command_table[] = { #endif #if defined(HAVE_TERMIOS_H) { "tty", - "?baud rate? ?data bits? ?stop bits? ?parity even|odd|none? ?handshake xonxoff|rtscts|none? ?input raw|cooked? ?output raw|cooked? ?vmin n? ?vtime n?", + "?baud rate? ?data bits? ?stop bits? ?parity even|odd|none? ?handshake xonxoff|rtscts|none? ?input raw|cooked? ?output raw|cooked? ?echo 0|1? ?vmin n? ?vtime n?", aio_cmd_tty, 0, -1, @@ -79,6 +79,7 @@ static const char * const tty_settings_names[] = { "stop", "vmin", "vtime", + "echo", NULL }; @@ -91,7 +92,8 @@ enum { OPT_PARITY, OPT_STOP, OPT_VMIN, - OPT_VTIME + OPT_VTIME, + OPT_ECHO }; @@ -319,6 +321,18 @@ badvalue: } break; + case OPT_ECHO: + if (Jim_GetLong(interp, valueObj, &l) != JIM_OK) { + goto badvalue; + } + if (l) { + tio.c_lflag |= ECHO; + } + else { + tio.c_lflag &= ~ECHO; + } + break; + } } diff --git a/jim_tcl.txt b/jim_tcl.txt index 01c33b4..26cfd93 100644 --- a/jim_tcl.txt +++ b/jim_tcl.txt @@ -60,6 +60,7 @@ Changes since 0.78 4. Add `signal block` to prevent delivery of signals 5. Add support for `file split` 6. Add support for `json::encode` and `json::decode` +7. `aio tty` now allows setting +echo+ without full +raw+ mode Changes between 0.77 and 0.78 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -4855,6 +4856,10 @@ aio +*output raw|cooked*+;; Output character processing. Typically CR -> CRNL is disabled in raw mode. + +*echo 0|1*+;; + Disable or enable echo on input. Note that this is a set-only value. + Setting +input+ to +raw+ or +cooked+ will overwrite this setting. + +*vmin* 'numchars'+;; Minimum number of characters to read. |