aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/stty/cchar.c1
-rw-r--r--bin/stty/modes.c6
-rw-r--r--bin/stty/print.c3
-rw-r--r--bin/stty/stty.114
4 files changed, 23 insertions, 1 deletions
diff --git a/bin/stty/cchar.c b/bin/stty/cchar.c
index 847cf749e0ac..b7a2128c7b1b 100644
--- a/bin/stty/cchar.c
+++ b/bin/stty/cchar.c
@@ -64,6 +64,7 @@ struct cchar cchars1[] = {
{ "eol", VEOL, CEOL },
{ "eol2", VEOL2, CEOL },
{ "erase", VERASE, CERASE },
+ { "erase2", VERASE2, CERASE2 },
{ "intr", VINTR, CINTR },
{ "kill", VKILL, CKILL },
{ "lnext", VLNEXT, CLNEXT },
diff --git a/bin/stty/modes.c b/bin/stty/modes.c
index b1f333e1013f..f724a5374bd4 100644
--- a/bin/stty/modes.c
+++ b/bin/stty/modes.c
@@ -191,10 +191,16 @@ struct modes omodes[] = {
{ "-litout", OPOST, 0 },
{ "onlcr", ONLCR, 0 },
{ "-onlcr", 0, ONLCR },
+ { "ocrnl", OCRNL, 0 },
+ { "-ocrnl", 0, OCRNL },
{ "tabs", 0, OXTABS }, /* "preserve" tabs */
{ "-tabs", OXTABS, 0 },
{ "oxtabs", OXTABS, 0 },
{ "-oxtabs", 0, OXTABS },
+ { "onocr", ONOCR, 0 },
+ { "-onocr", 0, ONOCR },
+ { "onlret", ONLRET, 0 },
+ { "-onlret", 0, ONLRET },
{ NULL },
};
diff --git a/bin/stty/print.c b/bin/stty/print.c
index a0149c24414f..364b95bb0078 100644
--- a/bin/stty/print.c
+++ b/bin/stty/print.c
@@ -148,7 +148,10 @@ print(tp, wp, ldisc, fmt)
binit("oflags");
put("-opost", OPOST, 1);
put("-onlcr", ONLCR, 1);
+ put("-ocrnl", OCRNL, 0);
put("-oxtabs", OXTABS, 1);
+ put("-onocr", OXTABS, 0);
+ put("-onlret", OXTABS, 0);
/* control flags (hardware state) */
tmp = tp->c_cflag;
diff --git a/bin/stty/stty.1 b/bin/stty/stty.1
index 0ba6223ee3b8..3720fbdaf5f6 100644
--- a/bin/stty/stty.1
+++ b/bin/stty/stty.1
@@ -237,8 +237,18 @@ Map (do not map)
to
.Dv CR-NL
on output.
+.It Cm ocrnl Pq Fl ocrnl
+Map (do not map)
+.Dv CR
+to
+.Dv NL
+on output.
.It Cm oxtabs Pq Fl oxtabs
Expand (do not expand) tabs to spaces on output.
+.It Cm onocr Pq Fl onocr
+Do not (do) output CRs at column zero.
+.It Cm onlret Pq Fl onlret
+On the terminal NL performs (does not perform) the CR function.
.El
.Ss Local Modes:
.Pp
@@ -374,6 +384,7 @@ Recognized control-characters:
.It eol Ta Tn VEOL Ta EOL No character
.It eol2 Ta Tn VEOL2 Ta EOL2 No character
.It erase Ta Tn VERASE Ta ERASE No character
+.It erase2 Ta Tn VERASE2 Ta ERASE2 No character
.It werase Ta Tn VWERASE Ta WERASE No character
.It intr Ta Tn VINTR Ta INTR No character
.It kill Ta Tn VKILL Ta KILL No character
@@ -420,7 +431,8 @@ In addition
-nl unsets inlcr and igncr.
.It Cm ek
Reset
-.Dv ERASE
+.Dv ERASE ,
+.Dv ERASE2 ,
and
.Dv KILL
characters