summaryrefslogtreecommitdiffstats
path: root/bin/stty/modes.c
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2008-08-23 13:28:55 +0000
committered <ed@FreeBSD.org>2008-08-23 13:28:55 +0000
commit31729dd5739bedb99a14d1278fa6ab9b68f3746b (patch)
tree933f4d4d4547a7c5299ff6d829d5af0c2d246d78 /bin/stty/modes.c
parentca3f42bc92c8b47bd2a43dffa6b7c4ce20e01407 (diff)
downloadFreeBSD-src-31729dd5739bedb99a14d1278fa6ab9b68f3746b.zip
FreeBSD-src-31729dd5739bedb99a14d1278fa6ab9b68f3746b.tar.gz
Make stty(1) use tab0 and tab3 to handle tab completion.
After the MPSAFE TTY import, we have support for the TAB0 and TAB3 flags to handle tab expansion, while we only used to support OXTABS. Switch stty(1) to use tab0 and tab3 to print whether tab expansion is turned on or off. Implement the oxtabs and tabs switches by setting the appropriate TABx value. Even though POSIX only lists this as being XSI, we'd better follow it.
Diffstat (limited to 'bin/stty/modes.c')
-rw-r--r--bin/stty/modes.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/stty/modes.c b/bin/stty/modes.c
index e72e2df..cc18d2c 100644
--- a/bin/stty/modes.c
+++ b/bin/stty/modes.c
@@ -191,10 +191,12 @@ struct modes omodes[] = {
{ "-onlcr", 0, ONLCR },
{ "ocrnl", OCRNL, 0 },
{ "-ocrnl", 0, OCRNL },
- { "tabs", 0, OXTABS }, /* "preserve" tabs */
- { "-tabs", OXTABS, 0 },
- { "oxtabs", OXTABS, 0 },
- { "-oxtabs", 0, OXTABS },
+ { "tabs", TAB0, TABDLY }, /* "preserve" tabs */
+ { "-tabs", TAB3, TABDLY },
+ { "oxtabs", TAB3, TABDLY },
+ { "-oxtabs", TAB0, TABDLY },
+ { "tab0", TAB0, TABDLY },
+ { "tab3", TAB3, TABDLY },
{ "onocr", ONOCR, 0 },
{ "-onocr", 0, ONOCR },
{ "onlret", ONLRET, 0 },
OpenPOWER on IntegriCloud