summaryrefslogtreecommitdiff
path: root/jim-tty.c
diff options
context:
space:
mode:
Diffstat (limited to 'jim-tty.c')
-rw-r--r--jim-tty.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/jim-tty.c b/jim-tty.c
index 0ccab7b..5d9cee7 100644
--- a/jim-tty.c
+++ b/jim-tty.c
@@ -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;
+
}
}