head 1.46; access; symbols netbsd-10-0-RELEASE:1.46 netbsd-10-0-RC6:1.46 netbsd-10-0-RC5:1.46 netbsd-10-0-RC4:1.46 netbsd-10-0-RC3:1.46 netbsd-10-0-RC2:1.46 netbsd-10-0-RC1:1.46 netbsd-10:1.46.0.2 netbsd-10-base:1.46 netbsd-9-3-RELEASE:1.45 cjep_sun2x-base1:1.45 cjep_sun2x:1.45.0.12 cjep_sun2x-base:1.45 cjep_staticlib_x-base1:1.45 netbsd-9-2-RELEASE:1.45 cjep_staticlib_x:1.45.0.10 cjep_staticlib_x-base:1.45 netbsd-9-1-RELEASE:1.45 phil-wifi-20200421:1.45 phil-wifi-20200411:1.45 is-mlppp:1.45.0.8 is-mlppp-base:1.45 phil-wifi-20200406:1.45 netbsd-8-2-RELEASE:1.43 netbsd-9-0-RELEASE:1.45 netbsd-9-0-RC2:1.45 netbsd-9-0-RC1:1.45 phil-wifi-20191119:1.45 netbsd-9:1.45.0.6 netbsd-9-base:1.45 phil-wifi-20190609:1.45 netbsd-8-1-RELEASE:1.43 netbsd-8-1-RC1:1.43 pgoyette-compat-merge-20190127:1.45 pgoyette-compat-20190127:1.45 pgoyette-compat-20190118:1.45 pgoyette-compat-1226:1.45 pgoyette-compat-1126:1.45 pgoyette-compat-1020:1.45 pgoyette-compat-0930:1.45 pgoyette-compat-0906:1.45 netbsd-7-2-RELEASE:1.41 pgoyette-compat-0728:1.45 netbsd-8-0-RELEASE:1.43 phil-wifi:1.45.0.4 phil-wifi-base:1.45 pgoyette-compat-0625:1.45 netbsd-8-0-RC2:1.43 pgoyette-compat-0521:1.45 pgoyette-compat-0502:1.45 pgoyette-compat-0422:1.45 netbsd-8-0-RC1:1.43 pgoyette-compat-0415:1.45 pgoyette-compat-0407:1.45 pgoyette-compat-0330:1.45 pgoyette-compat-0322:1.45 pgoyette-compat-0315:1.45 netbsd-7-1-2-RELEASE:1.41 pgoyette-compat:1.45.0.2 pgoyette-compat-base:1.45 netbsd-7-1-1-RELEASE:1.41 matt-nb8-mediatek:1.43.0.10 matt-nb8-mediatek-base:1.43 perseant-stdc-iso10646:1.43.0.8 perseant-stdc-iso10646-base:1.43 netbsd-8:1.43.0.6 netbsd-8-base:1.43 prg-localcount2-base3:1.43 prg-localcount2-base2:1.43 prg-localcount2-base1:1.43 prg-localcount2:1.43.0.4 prg-localcount2-base:1.43 pgoyette-localcount-20170426:1.43 bouyer-socketcan-base1:1.43 pgoyette-localcount-20170320:1.43 netbsd-7-1:1.41.0.20 netbsd-7-1-RELEASE:1.41 netbsd-7-1-RC2:1.41 netbsd-7-nhusb-base-20170116:1.41 bouyer-socketcan:1.43.0.2 bouyer-socketcan-base:1.43 pgoyette-localcount-20170107:1.43 netbsd-7-1-RC1:1.41 pgoyette-localcount-20161104:1.43 netbsd-7-0-2-RELEASE:1.41 localcount-20160914:1.43 netbsd-7-nhusb:1.41.0.18 netbsd-7-nhusb-base:1.41 pgoyette-localcount-20160806:1.41 pgoyette-localcount-20160726:1.41 pgoyette-localcount:1.41.0.16 pgoyette-localcount-base:1.41 netbsd-7-0-1-RELEASE:1.41 netbsd-7-0:1.41.0.14 netbsd-7-0-RELEASE:1.41 netbsd-7-0-RC3:1.41 netbsd-7-0-RC2:1.41 netbsd-7-0-RC1:1.41 netbsd-5-2-3-RELEASE:1.34 netbsd-5-1-5-RELEASE:1.34 netbsd-6-0-6-RELEASE:1.39.8.1 netbsd-6-1-5-RELEASE:1.39.8.1 netbsd-7:1.41.0.12 netbsd-7-base:1.41 yamt-pagecache-base9:1.41 yamt-pagecache-tag8:1.39.6.1 netbsd-6-1-4-RELEASE:1.39.8.1 netbsd-6-0-5-RELEASE:1.39.8.1 tls-earlyentropy:1.41.0.10 tls-earlyentropy-base:1.41 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.41 riastradh-drm2-base3:1.41 netbsd-6-1-3-RELEASE:1.39.8.1 netbsd-6-0-4-RELEASE:1.39.8.1 netbsd-5-2-2-RELEASE:1.34 netbsd-5-1-4-RELEASE:1.34 netbsd-6-1-2-RELEASE:1.39.8.1 netbsd-6-0-3-RELEASE:1.39.8.1 netbsd-5-2-1-RELEASE:1.34 netbsd-5-1-3-RELEASE:1.34 netbsd-6-1-1-RELEASE:1.39.8.1 riastradh-drm2-base2:1.41 riastradh-drm2-base1:1.41 riastradh-drm2:1.41.0.4 riastradh-drm2-base:1.41 netbsd-6-1:1.39.8.1.0.6 netbsd-6-0-2-RELEASE:1.39.8.1 netbsd-6-1-RELEASE:1.39.8.1 khorben-n900:1.41.0.8 netbsd-6-1-RC4:1.39.8.1 netbsd-6-1-RC3:1.39.8.1 agc-symver:1.41.0.6 agc-symver-base:1.41 netbsd-6-1-RC2:1.39.8.1 netbsd-6-1-RC1:1.39.8.1 yamt-pagecache-base8:1.41 netbsd-5-2:1.34.0.30 netbsd-6-0-1-RELEASE:1.39.8.1 yamt-pagecache-base7:1.41 netbsd-5-2-RELEASE:1.34 netbsd-5-2-RC1:1.34 matt-nb6-plus-nbase:1.39.8.1 yamt-pagecache-base6:1.41 netbsd-6-0:1.39.8.1.0.4 netbsd-6-0-RELEASE:1.39.8.1 netbsd-6-0-RC2:1.39.8.1 tls-maxphys:1.41.0.2 tls-maxphys-base:1.41 matt-nb6-plus:1.39.8.1.0.2 matt-nb6-plus-base:1.39.8.1 netbsd-6-0-RC1:1.39.8.1 yamt-pagecache-base5:1.39 yamt-pagecache-base4:1.39 netbsd-6:1.39.0.8 netbsd-6-base:1.39 netbsd-5-1-2-RELEASE:1.34 netbsd-5-1-1-RELEASE:1.34 yamt-pagecache-base3:1.39 yamt-pagecache-base2:1.39 yamt-pagecache:1.39.0.6 yamt-pagecache-base:1.39 cherry-xenmp:1.39.0.4 cherry-xenmp-base:1.39 bouyer-quota2-nbase:1.39 bouyer-quota2:1.39.0.2 bouyer-quota2-base:1.39 matt-mips64-premerge-20101231:1.39 matt-nb5-mips64-premerge-20101231:1.34 matt-nb5-pq3:1.34.0.28 matt-nb5-pq3-base:1.34 netbsd-5-1:1.34.0.26 netbsd-5-1-RELEASE:1.34 netbsd-5-1-RC4:1.34 matt-nb5-mips64-k15:1.34 netbsd-5-1-RC3:1.34 netbsd-5-1-RC2:1.34 netbsd-5-1-RC1:1.34 netbsd-5-0-2-RELEASE:1.34 matt-nb5-mips64-premerge-20091211:1.34 matt-premerge-20091211:1.36 matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.34 matt-nb4-mips64-k7-u2a-k9b:1.34 matt-nb5-mips64-u1-k1-k5:1.34 matt-nb5-mips64:1.34.0.24 netbsd-5-0-1-RELEASE:1.34 jym-xensuspend-nbase:1.35 netbsd-5-0:1.34.0.22 netbsd-5-0-RELEASE:1.34 netbsd-5-0-RC4:1.34 netbsd-5-0-RC3:1.34 netbsd-5-0-RC2:1.34 jym-xensuspend:1.34.0.20 jym-xensuspend-base:1.35 netbsd-5-0-RC1:1.34 netbsd-5:1.34.0.18 netbsd-5-base:1.34 matt-mips64-base2:1.34 matt-mips64:1.34.0.16 mjf-devfs2:1.34.0.14 mjf-devfs2-base:1.34 netbsd-4-0-1-RELEASE:1.33 wrstuden-revivesa-base-3:1.34 wrstuden-revivesa-base-2:1.34 wrstuden-fixsa-newbase:1.33 wrstuden-revivesa-base-1:1.34 yamt-pf42-base4:1.34 yamt-pf42-base3:1.34 hpcarm-cleanup-nbase:1.34 yamt-pf42-baseX:1.34 yamt-pf42-base2:1.34 wrstuden-revivesa:1.34.0.12 wrstuden-revivesa-base:1.34 yamt-pf42:1.34.0.10 yamt-pf42-base:1.34 keiichi-mipv6:1.34.0.8 keiichi-mipv6-base:1.34 matt-armv6-nbase:1.34 matt-armv6-prevmlocking:1.34 wrstuden-fixsa-base-1:1.33 netbsd-4-0:1.33.0.6 netbsd-4-0-RELEASE:1.33 cube-autoconf:1.34.0.6 cube-autoconf-base:1.34 netbsd-4-0-RC5:1.33 netbsd-4-0-RC4:1.33 netbsd-4-0-RC3:1.33 netbsd-4-0-RC2:1.33 netbsd-4-0-RC1:1.33 matt-armv6:1.34.0.4 matt-armv6-base:1.34 matt-mips64-base:1.34 hpcarm-cleanup:1.34.0.2 hpcarm-cleanup-base:1.34 netbsd-3-1-1-RELEASE:1.31 netbsd-3-0-3-RELEASE:1.31 wrstuden-fixsa:1.33.0.4 wrstuden-fixsa-base:1.33 abandoned-netbsd-4-base:1.31 abandoned-netbsd-4:1.31.0.6 netbsd-3-1:1.31.0.8 netbsd-3-1-RELEASE:1.31 netbsd-3-0-2-RELEASE:1.31 netbsd-3-1-RC4:1.31 netbsd-3-1-RC3:1.31 netbsd-3-1-RC2:1.31 netbsd-3-1-RC1:1.31 netbsd-4:1.33.0.2 netbsd-4-base:1.33 netbsd-3-0-1-RELEASE:1.31 netbsd-3-0:1.31.0.4 netbsd-3-0-RELEASE:1.31 netbsd-3-0-RC6:1.31 netbsd-3-0-RC5:1.31 netbsd-3-0-RC4:1.31 netbsd-3-0-RC3:1.31 netbsd-3-0-RC2:1.31 netbsd-3-0-RC1:1.31 netbsd-2-0-3-RELEASE:1.30 netbsd-2-1:1.30.0.6 netbsd-2-1-RELEASE:1.30 netbsd-2-1-RC6:1.30 netbsd-2-1-RC5:1.30 netbsd-2-1-RC4:1.30 netbsd-2-1-RC3:1.30 netbsd-2-1-RC2:1.30 netbsd-2-1-RC1:1.30 netbsd-2-0-2-RELEASE:1.30 netbsd-3:1.31.0.2 netbsd-3-base:1.31 netbsd-2-0-1-RELEASE:1.30 netbsd-2:1.30.0.4 netbsd-2-base:1.30 netbsd-2-0-RELEASE:1.30 netbsd-2-0-RC5:1.30 netbsd-2-0-RC4:1.30 netbsd-2-0-RC3:1.30 netbsd-2-0-RC2:1.30 netbsd-2-0-RC1:1.30 netbsd-2-0:1.30.0.2 netbsd-2-0-base:1.30 netbsd-1-6-PATCH002-RELEASE:1.24 netbsd-1-6-PATCH002:1.24 netbsd-1-6-PATCH002-RC4:1.24 netbsd-1-6-PATCH002-RC3:1.24 netbsd-1-6-PATCH002-RC2:1.24 netbsd-1-6-PATCH002-RC1:1.24 netbsd-1-6-PATCH001:1.24 netbsd-1-6-PATCH001-RELEASE:1.24 netbsd-1-6-PATCH001-RC3:1.24 netbsd-1-6-PATCH001-RC2:1.24 netbsd-1-6-PATCH001-RC1:1.24 fvdl_fs64_base:1.25 netbsd-1-6-RELEASE:1.24 netbsd-1-6-RC3:1.24 netbsd-1-6-RC2:1.24 netbsd-1-6-RC1:1.24 netbsd-1-6:1.24.0.2 netbsd-1-6-base:1.24 netbsd-1-5-PATCH003:1.20.10.1 netbsd-1-5-PATCH002:1.20.10.1 netbsd-1-5-PATCH001:1.20.10.1 netbsd-1-5-RELEASE:1.20.10.1 netbsd-1-5-BETA2:1.20.10.1 netbsd-1-5-BETA:1.20.10.1 netbsd-1-4-PATCH003:1.20 netbsd-1-5-ALPHA2:1.20 netbsd-1-5:1.20.0.10 netbsd-1-5-base:1.20 minoura-xpg4dl:1.20.0.8 minoura-xpg4dl-base:1.20 netbsd-1-4-PATCH002:1.20 wrstuden-devbsize-19991221:1.20 wrstuden-devbsize:1.20.0.6 wrstuden-devbsize-base:1.20 comdex-fall-1999:1.20.0.4 comdex-fall-1999-base:1.20 netbsd-1-4-PATCH001:1.20 netbsd-1-4-RELEASE:1.20 netbsd-1-4:1.20.0.2 netbsd-1-4-base:1.20 netbsd-1-3-PATCH003:1.16 netbsd-1-3-PATCH003-CANDIDATE2:1.16 netbsd-1-3-PATCH003-CANDIDATE1:1.16 netbsd-1-3-PATCH003-CANDIDATE0:1.16 netbsd-1-3-PATCH002:1.16 netbsd-1-3-PATCH001:1.16 netbsd-1-3-RELEASE:1.16 netbsd-1-3-BETA:1.16 netbsd-1-3:1.16.0.2 netbsd-1-3-base:1.16 netbsd-1-2-PATCH001:1.10 netbsd-1-2-RELEASE:1.10 netbsd-1-2-BETA:1.10 netbsd-1-2-base:1.10 netbsd-1-2:1.10.0.6 netbsd-1-1-PATCH001:1.10 netbsd-1-1-RELEASE:1.10 netbsd-1-1:1.10.0.2 netbsd-1-1-base:1.10 lite-2:1.1.1.3 netbsd-1-0-PATCH06:1.6 netbsd-1-0-PATCH05:1.6 netbsd-1-0-PATCH04:1.6 netbsd-1-0-PATCH03:1.6 netbsd-1-0-PATCH02:1.6 netbsd-1-0-PATCH1:1.6 netbsd-1-0-PATCH0:1.6 netbsd-1-0-RELEASE:1.6 netbsd-1-0:1.6.0.2 netbsd-1-0-base:1.6 lite-1:1.1.1.2 CSRG:1.1.1 netbsd-0-9-RELEASE:1.4 netbsd-0-9-BETA:1.4 netbsd-0-9-ALPHA2:1.4 netbsd-0-9-ALPHA:1.4 netbsd-0-9:1.4.0.2 netbsd-0-9-base:1.4 netbsd-0-8:1.3 netbsd-alpha-1:1.3 patchkit-0-2-2:1.1.1.1 WFJ-386bsd-01:1.1.1.1 WFJ-920714:1.1.1; locks; strict; comment @.\" @; 1.46 date 2022.05.14.21.04.34; author dholland; state Exp; branches; next 1.45; commitid Qoiv7PTKSenxd4ED; 1.45 date 2017.10.30.15.38.52; author wiz; state Exp; branches 1.45.4.1; next 1.44; commitid iW7hq3H9xCw7G5dA; 1.44 date 2017.10.25.06.32.59; author kre; state Exp; branches; next 1.43; commitid yVbhl8Lbu6BDOocA; 1.43 date 2016.08.14.23.29.43; author sevan; state Exp; branches; next 1.42; commitid bsyyBLA8gcE5skiz; 1.42 date 2016.08.12.02.49.18; author sevan; state Exp; branches; next 1.41; commitid bYiEnzo5T0WMGXhz; 1.41 date 2012.06.20.14.19.39; author wiz; state Exp; branches; next 1.40; 1.40 date 2012.06.20.10.09.21; author wiz; state Exp; branches; next 1.39; 1.39 date 2010.04.05.16.19.54; author joerg; state Exp; branches 1.39.6.1 1.39.8.1; next 1.38; 1.38 date 2009.12.14.07.35.44; author wiz; state Exp; branches; next 1.37; 1.37 date 2009.12.14.02.34.52; author dholland; state Exp; branches; next 1.36; 1.36 date 2009.05.13.22.41.43; author wiz; state Exp; branches; next 1.35; 1.35 date 2009.03.15.12.01.24; author joerg; state Exp; branches; next 1.34; 1.34 date 2007.06.24.18.03.00; author christos; state Exp; branches 1.34.20.1; next 1.33; 1.33 date 2006.09.03.00.24.05; author wiz; state Exp; branches; next 1.32; 1.32 date 2006.09.02.15.10.22; author itohy; state Exp; branches; next 1.31; 1.31 date 2004.04.01.16.10.03; author tsarna; state Exp; branches; next 1.30; 1.30 date 2004.02.13.09.55.51; author wiz; state Exp; branches; next 1.29; 1.29 date 2003.08.07.09.05.42; author agc; state Exp; branches; next 1.28; 1.28 date 2003.07.01.10.24.41; author wiz; state Exp; branches; next 1.27; 1.27 date 2003.03.30.20.52.51; author wiz; state Exp; branches; next 1.26; 1.26 date 2003.03.29.18.46.42; author perry; state Exp; branches; next 1.25; 1.25 date 2002.09.25.15.18.43; author wiz; state Exp; branches; next 1.24; 1.24 date 2002.02.08.01.22.01; author ross; state Exp; branches; next 1.23; 1.23 date 2001.12.20.20.08.25; author wiz; state Exp; branches; next 1.22; 1.22 date 2000.09.04.07.30.13; author kleink; state Exp; branches; next 1.21; 1.21 date 2000.08.28.02.11.06; author hubertf; state Exp; branches; next 1.20; 1.20 date 99.03.24.06.27.49; author mycroft; state Exp; branches 1.20.10.1; next 1.19; 1.19 date 99.01.13.23.55.26; author sommerfe; state Exp; branches; next 1.18; 1.18 date 98.02.13.21.53.48; author kleink; state Exp; branches; next 1.17; 1.17 date 98.02.06.05.40.33; author perry; state Exp; branches; next 1.16; 1.16 date 97.10.20.08.53.29; author enami; state Exp; branches; next 1.15; 1.15 date 97.10.20.08.08.10; author scottr; state Exp; branches; next 1.14; 1.14 date 97.04.02.03.13.17; author kleink; state Exp; branches; next 1.13; 1.13 date 97.03.13.05.03.45; author mikel; state Exp; branches; next 1.12; 1.12 date 97.03.08.13.29.57; author mouse; state Exp; branches; next 1.11; 1.11 date 96.11.11.00.18.50; author lukem; state Exp; branches; next 1.10; 1.10 date 95.09.07.06.57.14; author jtc; state Exp; branches; next 1.9; 1.9 date 95.08.18.10.32.03; author pk; state Exp; branches; next 1.8; 1.8 date 95.07.25.19.37.51; author jtc; state Exp; branches; next 1.7; 1.7 date 95.03.21.09.11.27; author cgd; state Exp; branches; next 1.6; 1.6 date 94.09.20.04.52.11; author mycroft; state Exp; branches 1.6.2.1; next 1.5; 1.5 date 93.08.01.07.47.49; author mycroft; state Exp; branches; next 1.4; 1.4 date 93.06.01.14.42.16; author cgd; state Exp; branches; next 1.3; 1.3 date 93.03.23.00.30.25; author cgd; state Exp; branches; next 1.2; 1.2 date 93.03.22.08.04.00; author cgd; state Exp; branches; next 1.1; 1.1 date 93.03.21.09.45.37; author cgd; state Exp; branches 1.1.1.1; next ; 1.45.4.1 date 2020.04.21.18.41.07; author martin; state dead; branches; next 1.45.4.2; commitid 86tA4aEmdr3VCh5C; 1.45.4.2 date 2020.04.21.19.37.35; author martin; state Exp; branches; next ; commitid x6IB64bYH9UmWh5C; 1.39.6.1 date 2012.10.30.18.46.09; author yamt; state Exp; branches; next ; 1.39.8.1 date 2012.06.28.16.12.07; author riz; state Exp; branches; next ; 1.34.20.1 date 2009.05.13.19.15.51; author jym; state Exp; branches; next ; 1.20.10.1 date 2000.08.28.04.25.47; author hubertf; state Exp; branches; next ; 1.6.2.1 date 94.09.20.04.52.11; author mycroft; state dead; branches; next 1.6.2.2; 1.6.2.2 date 94.09.20.04.52.12; author mycroft; state Exp; branches; next ; 1.1.1.1 date 93.03.21.09.45.37; author cgd; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 94.09.20.04.18.43; author mycroft; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 95.09.07.06.55.05; author jtc; state Exp; branches; next ; desc @@ 1.46 log @Clarify that "stty 0" will normally hang up the tty. Bump date. @ text @.\" $NetBSD: stty.1,v 1.45 2017/10/30 15:38:52 wiz Exp $ .\" .\" Copyright (c) 1990, 1993, 1994 .\" The Regents of the University of California. All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" the Institute of Electrical and Electronics Engineers, Inc. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" @@(#)stty.1 8.5 (Berkeley) 6/1/94 .\" .Dd May 14, 2022 .Dt STTY 1 .Os .Sh NAME .Nm stty .Nd set options for a terminal device interface .Sh SYNOPSIS .Nm .Op Fl a | Fl e | Fl g .Op Fl f Ar file .Op operand ... .Sh DESCRIPTION The .Nm utility sets or reports on terminal characteristics for the device that is its standard input. If no options or operands are specified, it reports the settings of a subset of characteristics as well as additional ones if they differ from their default values. Otherwise it modifies the terminal state according to the specified arguments. Some combinations of arguments are mutually exclusive on some terminal types. .Pp The following options are available: .Bl -tag -width XfXfileXX .It Fl a Display all the current settings for the terminal to standard output as per .St -p1003.2 . .It Fl e Display all the current settings for the terminal to standard output in the traditional .Bx .Dq all and .Dq everything formats. .It Fl f Ar file Open and use the terminal named by .Ar file rather than using standard input. The file is opened using the .Dv O_NONBLOCK flag of .Fn open , making it possible to set or display settings on a terminal that might otherwise block on the open. .It Fl g Display all the current settings for the terminal to standard output in a form that may be used as an argument to a subsequent invocation of .Nm to restore the current terminal state as per .St -p1003.2 . .El .Pp The following arguments are available to set the terminal characteristics: .Ss Control Modes Control mode flags affect hardware characteristics associated with the terminal. This corresponds to the .Fa c_cflag of the .Xr termios 4 structure. .Bl -tag -width Fl .It Cm parenb Pq Fl parenb Enable (disable) parity generation and detection. .It Cm parodd Pq Fl parodd Select odd (even) parity. .It Cm cs5 cs6 cs7 cs8 Select character size, if possible. .It Ar number Set terminal baud rate to .Ar number , if possible. If the baud rate is set to zero, modem control is no longer asserted; this will normally hang up the line, including on ptys and other devices not physically connected to modems. .It Cm ispeed Ar number Set terminal input baud rate to .Ar number , if possible. If the input baud rate is set to zero, the input baud rate is set to the value of the output baud rate. .It Cm ospeed Ar number Set terminal output baud rate to .Ar number , if possible. If the output baud rate is set to zero, modem control is no longer asserted. .It Cm speed Ar number This sets both .Cm ispeed and .Cm ospeed to .Ar number . .It Cm hupcl Pq Fl hupcl Stop asserting modem control (do not stop asserting modem control) on last close. .It Cm hup Pq Fl hup Same as hupcl .Pq Fl hupcl . .It Cm cstopb Pq Fl cstopb Use two (one) stop bits per character. .It Cm cread Pq Fl cread Enable (disable) the receiver. .It Cm clocal Pq Fl clocal Assume a line without (with) modem control. .It Cm crtscts Pq Fl crtscts Enable RTS/CTS flow control. .It Cm cdtrcts Pq Fl cdtrcts Enable DTR/CTS flow control (if supported). .El .Ss Input Modes This corresponds to the .Fa c_iflag of the .Xr termios 4 structure. .Bl -tag -width Fl .It Cm ignbrk Pq Fl ignbrk Ignore (do not ignore) break on input. .It Cm brkint Pq Fl brkint Signal (do not signal) .Dv INTR on break. .It Cm ignpar Pq Fl ignpar Ignore (do not ignore) parity errors. .It Cm parmrk Pq Fl parmrk Mark (do not mark) parity errors. .It Cm inpck Pq Fl inpck Enable (disable) input parity checking. .It Cm istrip Pq Fl istrip Strip (do not strip) input characters to seven bits. .It Cm inlcr Pq Fl inlcr Map (do not map) .Dv NL to .Dv CR on input. .It Cm igncr Pq Fl igncr Ignore (do not ignore) .Dv CR on input. .It Cm icrnl Pq Fl icrnl Map (do not map) .Dv CR to .Dv NL on input. .It Cm ixon Pq Fl ixon Enable (disable) .Dv START/STOP output control. Output from the system is stopped when the system receives .Dv STOP and started when the system receives .Dv START , or if .Cm ixany is set, any character restarts output. .It Cm ixoff Pq Fl ixoff Request that the system send (not send) .Dv START/STOP characters when the input queue is nearly empty/full. .It Cm ixany Pq Fl ixany Allow any character (allow only .Dv START ) to restart output. .It Cm imaxbel Pq Fl imaxbel The system imposes a limit of .Dv MAX_INPUT (currently 255) characters in the input queue. If .Cm imaxbel is set and the input queue limit has been reached, subsequent input causes the system to send an ASCII BEL character to the output queue (the terminal beeps at you). Otherwise, if .Cm imaxbel is unset and the input queue is full, the next input character causes the entire input and output queues to be discarded. .El .Ss Output Modes This corresponds to the .Fa c_oflag of the .Xr termios 4 structure. .Bl -tag -width Fl .It Cm opost Pq Fl opost Post-process output (do not post-process output; ignore all other output modes). .It Cm onlcr Pq Fl onlcr Map (do not map) .Dv NL 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 Local mode flags (lflags) affect various and sundry characteristics of terminal processing. Historically the term "local" pertained to new job control features implemented by Jim Kulp on a PDP-11/70 at IIASA. Later the driver ran on the first VAX at Evans Hall, UC Berkeley, where the job control details were greatly modified but the structure definitions and names remained essentially unchanged. The second interpretation of the .Sq l in lflag is .Dq line discipline flag , which corresponds to the .Fa c_lflag of the .Xr termios 4 structure. .Bl -tag -width Fl .It Cm isig Pq Fl isig Enable (disable) the checking of characters against the special control characters .Dv INTR , QUIT , and .Dv SUSP . .It Cm icanon Pq Fl icanon Enable (disable) canonical input .Dv ( ERASE and .Dv KILL processing). .It Cm iexten Pq Fl iexten Enable (disable) any implementation defined special control characters not currently controlled by icanon, isig, or ixon. .It Cm echo Pq Fl echo Echo back (do not echo back) every character typed. .It Cm echoe Pq Fl echoe The .Dv ERASE character shall (shall not) visually erase the last character in the current line from the display, if possible. .It Cm echok Pq Fl echok Echo (do not echo) .Dv NL after .Dv KILL character. .It Cm echoke Pq Fl echoke The .Dv KILL character shall (shall not) visually erase the current line from the display, if possible. .It Cm echonl Pq Fl echonl Echo (do not echo) .Dv NL , even if echo is disabled. .It Cm echoctl Pq Fl echoctl If .Cm echoctl is set, echo control characters as ^X. Otherwise control characters echo as themselves. .It Cm echoprt Pq Fl echoprt For printing terminals. If set, echo erased characters backwards within .Dq \e and .Dq / . Otherwise, disable this feature. .It Cm noflsh Pq Fl noflsh Disable (enable) flush after .Dv INTR , QUIT , SUSP . .It Cm tostop Pq Fl tostop Send (do not send) .Dv SIGTTOU for background output. This causes background jobs to stop if they attempt terminal output. .It Cm altwerase Pq Fl altwerase Use (do not use) an alternative word erase algorithm when processing .Dv WERASE characters. This alternative algorithm considers sequences of alphanumeric/underscores as words. It also skips the first preceding character in its classification (as a convenience since the one preceding character could have been erased with simply an .Dv ERASE character). .It Cm mdmbuf Pq Fl mdmbuf If set, flow control output based on condition of Carrier Detect. Otherwise writes return an error if Carrier Detect is low (and Carrier is not being ignored with the .Dv CLOCAL flag). .It Cm flusho Pq Fl flusho Indicates output is (is not) being discarded. .It Cm pendin Pq Fl pendin Indicates input is (is not) pending after a switch from non-canonical to canonical mode and will be re-input when a read becomes pending or more input arrives. .El .Ss Control Characters .Bl -tag -width Fl .It Ar control-character Ar string Set .Ar control-character to string .Ar string . If the string is a single character, then the control character is set to that character. If the string is the two character sequence "^-" or the string "undef", then the control character is disabled (i.e., set to .Bro Dv _POSIX_VDISABLE Brc ) . .Pp Recognized control characters: .Bd -ragged -offset indent .Bl -column character Subscript Description .It control- Ta "" Ta "" .It character Subscript Description .It _________ _________ _______________ .It eof Ta VEOF Ta EOF No character .It eol Ta VEOL Ta EOL No character .It eol2 Ta VEOL2 Ta EOL2 No character .It erase Ta VERASE Ta ERASE No character .It werase Ta VWERASE Ta WERASE No character .It kill Ta VKILL Ta KILL No character .It reprint Ta VREPRINT Ta REPRINT No character .It intr Ta VINTR Ta INTR No character .It quit Ta VQUIT Ta QUIT No character .It susp Ta VSUSP Ta SUSP No character .It dsusp Ta VDSUSP Ta DSUSP No character .It start Ta VSTART Ta START No character .It stop Ta VSTOP Ta STOP No character .It lnext Ta VLNEXT Ta LNEXT No character .It status Ta VSTATUS Ta STATUS No character .It discard Ta VDISCARD Ta DISCARD No character .El .Ed .It Cm min Ar number .It Cm time Ar number Set the value of min or time to .Ar number . .Dv MIN and .Dv TIME are used in Non-Canonical mode input processing (-icanon). .El .Ss Combination Modes .Bl -tag -width Fl .It Ar saved settings Set the current terminal characteristics to the saved settings produced by the .Fl g option. .It Cm evenp No or Cm parity Enable parenb and cs7; disable parodd. .It Cm oddp Enable parenb, cs7, and parodd. .It Fl parity , evenp , oddp Disable parenb, and set cs8. .It Cm \&nl Pq Fl \&nl Enable (disable) icrnl. In addition -nl unsets inlcr and igncr. .It Cm ek Reset .Dv ERASE and .Dv KILL characters back to system defaults. .It Cm sane Resets all modes to reasonable values for interactive terminal use. .It Cm insane Sets all modes to random values, which are very likely .Pq but not guaranteed to be unreasonable for interactive terminal use. .It Cm tty Set the line discipline to the standard terminal line discipline .Dv TTYDISC . .It Cm crt Pq Fl crt Set (disable) all modes suitable for a CRT display device. .It Cm kerninfo Pq Fl kerninfo Enable (disable) the system generated status line associated with processing a .Dv STATUS character (usually set to ^T). The status line consists of the system load average, the current command name, its process ID, the event the process is waiting on (or the status of the process), the user and system times, percent CPU, and current memory usage. .It Cm cols Ar number The terminal size is recorded as having .Ar number columns. .It Cm columns Ar number An alias for .Cm cols . .It Cm rows Ar number The terminal size is recorded as having .Ar number rows. .It Cm dec Set modes suitable for users of Digital Equipment Corporation systems .Dv ( ERASE , .Dv KILL , and .Dv INTR characters are set to ^?, ^U, and ^C; .Dv ixany is disabled, and .Dv crt is enabled). .It Cm extproc Pq Fl extproc If set, this flag indicates that some amount of terminal processing is being performed by either the terminal hardware or by the remote side connected to a pty. .It Cm raw Pq Fl raw If set, change the modes of the terminal so that no input or output processing is performed. If unset, change the modes of the terminal to some reasonable state that performs input and output processing. Note that since the terminal driver no longer has a single .Dv RAW bit, it is not possible to intuit what flags were set prior to setting .Cm raw . This means that unsetting .Cm raw may not put back all the setting that were previously in effect. To set the terminal into a raw state and then accurately restore it, the following shell code is recommended: .Bd -literal -offset indent save_state=$(stty -g) stty raw \&... stty "$save_state" .Ed .It Cm size The size of the terminal is printed as two numbers on a single line, first rows, then columns. .El .Ss Compatibility Modes These modes remain for compatibility with the previous version of the .Nm utility. .Bl -tag -width Fl .It Cm all Reports all the terminal modes as with .Cm stty Fl a except that the control characters are printed in a columnar format. .It Cm everything Same as .Cm all . .It Cm cooked Same as .Cm sane . .It Cm cbreak If set, enables .Cm brkint , ixon , imaxbel , opost , .Cm isig , iexten , and .Fl icanon . If unset, same as .Cm sane . .It Cm new Same as .Cm tty . .It Cm old Same as .Cm tty . .It Cm newcrt Pq Fl newcrt Same as .Cm crt . .It Cm pass8 The converse of .Cm parity . .It Cm tandem Pq Fl tandem Same as .Cm ixoff . .It Cm decctlq Pq Fl decctlq The converse of .Cm ixany . .It Cm crterase Pq Fl crterase Same as .Cm echoe . .It Cm crtbs Pq Fl crtbs Same as .Cm echoe . .It Cm crtkill Pq Fl crtkill Same as .Cm echoke . .It Cm ctlecho Pq Fl ctlecho Same as .Cm echoctl . .It Cm prterase Pq Fl prterase Same as .Cm echoprt . .It Cm litout Pq Fl litout The converse of .Cm opost . .It Cm tabs Pq Fl tabs The converse of .Cm oxtabs . .It Cm brk Ar value Same as the control character .Cm eol . .It Cm flush Ar value Same as the control character .Cm discard . .It Cm rprnt Ar value Same as the control character .Cm reprint . .El .Ss Control operations These operations are not modes, but rather commands to be performed by the tty layer. .Bl -tag -width Fl .It Cm ostart Performs a "start output" operation, as normally done by an incoming START character when .Cm ixon is set. .It Cm ostop Performs a "stop output" operation, as normally done by an incoming STOP character when .Cm ixon is set. .El .Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr termios 4 , .Xr tty 4 .Sh STANDARDS The .Nm utility is expected to be .St -p1003.2 compatible. The .Fl e and .Fl f flags are extensions to the standard, as are the operands mentioned in the control operations section. .Sh HISTORY An .Nm utility appeared in .At v2 . @ 1.45 log @Remove Tn. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.44 2017/10/25 06:32:59 kre Exp $ d35 1 a35 1 .Dd August 15, 2016 d117 2 a118 1 asserted. @ 1.45.4.1 log @Sync with HEAD @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.45 2017/10/30 15:38:52 wiz Exp $ @ 1.45.4.2 log @Ooops, restore accidently removed files from merge mishap @ text @@ 1.44 log @Implement tcgetwinsize() and tcsetwinsize() in libc, with access via (and document them.) Bump libc minor number for them. Arrange for "struct winsize" to become visible in Fix stty(1) so that "cols" is reported as the arg to set number of columns, and "columns" is the alias, rather than the other way around, as "cols" is what has been added to POSIX. This is to conform with updates to be included in 1003.1 issue 8 (whenever that gets published) currently available at: http://austingroupbugs.net/view.php?id=1053 (see note 3863) http://austingroupbugs.net/view.php?id=1151 (see note 3856) @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.43 2016/08/14 23:29:43 sevan Exp $ d276 4 a279 9 implemented by Jim Kulp on a .Tn PDP Ns -11/70 at .Tn IIASA . Later the driver ran on the first .Tn VAX at Evans Hall, UC Berkeley, where the job control details were greatly modified but the structure definitions and names remained essentially unchanged. d403 16 a418 16 .It eof Ta Tn VEOF Ta EOF No character .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 werase Ta Tn VWERASE Ta WERASE No character .It kill Ta Tn VKILL Ta KILL No character .It reprint Ta Tn VREPRINT Ta REPRINT No character .It intr Ta Tn VINTR Ta INTR No character .It quit Ta Tn VQUIT Ta QUIT No character .It susp Ta Tn VSUSP Ta SUSP No character .It dsusp Ta Tn VDSUSP Ta DSUSP No character .It start Ta Tn VSTART Ta START No character .It stop Ta Tn VSTOP Ta STOP No character .It lnext Ta Tn VLNEXT Ta LNEXT No character .It status Ta Tn VSTATUS Ta STATUS No character .It discard Ta Tn VDISCARD Ta DISCARD No character @ 1.43 log @While the v2 source and man pages are incomplete, TUHS has a scanned copy of the printed version of the 2nd edition manual. stty is featured in this copy, in the table of contents listed as meaning "set typewriter modes" and on the actual manual page headed correctly as "set teletype options" http://www.tuhs.org/Archive/PDP-11/Distributions/research/1972_stuff/unix_2nd_edition_manual.pdf Ammend HISTORY and bump date. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.42 2016/08/12 02:49:18 sevan Exp $ d480 1 a480 1 .It Cm columns Ar number d484 1 a484 1 .It Cm cols Ar number d486 1 a486 1 .Cm columns . @ 1.42 log @Document the version stty first appeared. Bump date. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.41 2012/06/20 14:19:39 wiz Exp $ d35 1 a35 1 .Dd August 12, 2016 d640 1 a640 1 .At v3 . @ 1.41 log @Remove another Pf. From Bug Hunting. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.40 2012/06/20 10:09:21 wiz Exp $ d35 1 a35 1 .Dd June 16, 2012 d636 5 @ 1.40 log @- improve wording, and create more consistency within the text; - correct `SYNOPSIS'; - improve macro usage; - mention argument name for `-f' (and change list width for it); - correct misplacement of periods (`.') and a parenthese (`('); - fix typo; - bump date. From Bug Hunting. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.39 2010/04/05 16:19:54 joerg Exp $ d493 1 a493 1 .Pf ( Dv ERASE , @ 1.39 log @\\ -> \e @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.38 2009/12/14 07:35:44 wiz Exp $ d35 1 a35 1 .Dd December 14, 2009 d40 1 a40 1 .Nd set the options for a terminal device interface d45 1 a45 1 .Op operands d60 1 a60 1 .Bl -tag -width Ds d69 5 a73 2 ``all'' and ``everything'' formats. .It Fl f d97 5 a101 1 This corresponds to the c_cflag in the termios structure. d111 3 a113 2 Set terminal baud rate to the number given, if possible. d119 3 a121 2 Set terminal input baud rate to the number given, if possible. d129 2 a130 1 the number given, if possible. d161 5 a165 1 This corresponds to the c_iflag in the termios structure. d243 5 a247 1 This corresponds to the c_oflag of the termios structure. d285 7 a291 3 The second interpretation of the 'l' in lflag is ``line discipline flag'' which corresponds to the .Ar c_lflag d293 1 a293 1 .Ar termios d305 1 a305 1 .Pf ( Dv ERASE d349 4 a352 2 If set, echo erased characters backwards within ``\e'' and ``/''. d372 1 a372 1 character.) d378 1 a378 1 flag.) d391 1 a391 1 to d393 2 a394 2 If string is a single character, the control character is set to d396 1 a396 1 If string is the d398 3 a400 3 string "undef" the control character is disabled (i.e. set to .Bro Dv _POSIX_VDISABLE Brc . ) d402 1 a402 1 Recognized control-characters: d429 1 a429 1 number. d485 1 a485 1 is an alias for d492 2 a493 2 Set modes suitable for users of Digital Equipment Corporation systems ( .Dv ERASE , d501 1 a501 1 is enabled.) d532 3 a534 1 the stty command. d619 1 a619 3 The .Nm utility exits with a value of 0 if successful, and \*[Gt]0 if an error occurs. d629 1 a629 1 The flags d633 1 a633 1 are @ 1.39.6.1 log @sync with head @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.39 2010/04/05 16:19:54 joerg Exp $ d35 1 a35 1 .Dd June 16, 2012 d40 1 a40 1 .Nd set options for a terminal device interface d45 1 a45 1 .Op operand ... d60 1 a60 1 .Bl -tag -width XfXfileXX d69 2 a70 5 .Dq all and .Dq everything formats. .It Fl f Ar file d94 1 a94 5 This corresponds to the .Fa c_cflag of the .Xr termios 4 structure. d104 2 a105 3 Set terminal baud rate to .Ar number , if possible. d111 2 a112 3 Set terminal input baud rate to .Ar number , if possible. d120 1 a120 2 .Ar number , if possible. d151 1 a151 5 This corresponds to the .Fa c_iflag of the .Xr termios 4 structure. d229 1 a229 5 This corresponds to the .Fa c_oflag of the .Xr termios 4 structure. d267 3 a269 7 The second interpretation of the .Sq l in lflag is .Dq line discipline flag , which corresponds to the .Fa c_lflag d271 1 a271 1 .Xr termios 4 d283 1 a283 1 .Dv ( ERASE d327 2 a328 4 If set, echo erased characters backwards within .Dq \e and .Dq / . d348 1 a348 1 character). d354 1 a354 1 flag). d367 1 a367 1 to string d369 2 a370 2 If the string is a single character, then the control character is set to d372 1 a372 1 If the string is the d374 3 a376 3 string "undef", then the control character is disabled (i.e., set to .Bro Dv _POSIX_VDISABLE Brc ) . d378 1 a378 1 Recognized control characters: d405 1 a405 1 .Ar number . d461 1 a461 1 An alias for d468 2 a469 2 Set modes suitable for users of Digital Equipment Corporation systems .Dv ( ERASE , d477 1 a477 1 is enabled). d508 1 a508 3 the .Nm utility. d593 3 a595 1 .Ex -std d605 1 a605 1 The d609 1 a609 1 flags are @ 1.39.8.1 log @Pull up following revision(s) (requested by wiz in ticket #364): bin/stty/stty.1: revision 1.40 bin/stty/stty.1: revision 1.41 bin/stty/stty.c: revision 1.22 - improve wording, and create more consistency within the text; - correct `SYNOPSIS'; - improve macro usage; - mention argument name for `-f' (and change list width for it); - correct misplacement of periods (`.') and a parenthese (`('); - fix typo; - bump date. From Bug Hunting. - remove trailing white space; - sync `usage' with man page. From patch by Bug Hunting. Remove another Pf. From Bug Hunting. @ text @d1 1 a1 1 .\" $NetBSD$ d35 1 a35 1 .Dd June 16, 2012 d40 1 a40 1 .Nd set options for a terminal device interface d45 1 a45 1 .Op operand ... d60 1 a60 1 .Bl -tag -width XfXfileXX d69 2 a70 5 .Dq all and .Dq everything formats. .It Fl f Ar file d94 1 a94 5 This corresponds to the .Fa c_cflag of the .Xr termios 4 structure. d104 2 a105 3 Set terminal baud rate to .Ar number , if possible. d111 2 a112 3 Set terminal input baud rate to .Ar number , if possible. d120 1 a120 2 .Ar number , if possible. d151 1 a151 5 This corresponds to the .Fa c_iflag of the .Xr termios 4 structure. d229 1 a229 5 This corresponds to the .Fa c_oflag of the .Xr termios 4 structure. d267 3 a269 7 The second interpretation of the .Sq l in lflag is .Dq line discipline flag , which corresponds to the .Fa c_lflag d271 1 a271 1 .Xr termios 4 d283 1 a283 1 .Dv ( ERASE d327 2 a328 4 If set, echo erased characters backwards within .Dq \e and .Dq / . d348 1 a348 1 character). d354 1 a354 1 flag). d367 1 a367 1 to string d369 2 a370 2 If the string is a single character, then the control character is set to d372 1 a372 1 If the string is the d374 3 a376 3 string "undef", then the control character is disabled (i.e., set to .Bro Dv _POSIX_VDISABLE Brc ) . d378 1 a378 1 Recognized control characters: d405 1 a405 1 .Ar number . d461 1 a461 1 An alias for d468 2 a469 2 Set modes suitable for users of Digital Equipment Corporation systems .Dv ( ERASE , d477 1 a477 1 is enabled). d508 1 a508 3 the .Nm utility. d593 3 a595 1 .Ex -std d605 1 a605 1 The d609 1 a609 1 flags are @ 1.38 log @Bump date for previous. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.37 2009/12/14 02:34:52 dholland Exp $ d327 1 a327 1 If set, echo erased characters backwards within ``\\'' @ 1.37 log @Document "stty insane" properly. Closes PR bin/25024. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.36 2009/05/13 22:41:43 wiz Exp $ d35 1 a35 1 .Dd June 24, 2007 @ 1.36 log @Reduce Pf/Ns usage. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.35 2009/03/15 12:01:24 joerg Exp $ d439 3 a441 1 Resets all modes to unreasonable values for interactive terminal use. @ 1.35 log @Fix markup. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.34 2007/06/24 18:03:00 christos Exp $ d376 1 a376 1 .Pf { Dv _POSIX_VDISABLE Ns } . ) @ 1.34 log @PR/36536: Greg A. Woods: stty(1) should mention tty(4) @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.33 2006/09/03 00:24:05 wiz Exp $ d380 2 a381 2 .Bl -column character Subscript .It control- d384 16 a399 16 .It eof Ta Tn VEOF EOF No character .It eol Ta Tn VEOL EOL No character .It eol2 Ta Tn VEOL2 EOL2 No character .It erase Ta Tn VERASE ERASE No character .It werase Ta Tn VWERASE WERASE No character .It kill Ta Tn VKILL KILL No character .It reprint Ta Tn VREPRINT REPRINT No character .It intr Ta Tn VINTR INTR No character .It quit Ta Tn VQUIT QUIT No character .It susp Ta Tn VSUSP SUSP No character .It dsusp Ta Tn VDSUSP DSUSP No character .It start Ta Tn VSTART START No character .It stop Ta Tn VSTOP STOP No character .It lnext Ta Tn VLNEXT LNEXT No character .It status Ta Tn VSTATUS STATUS No character .It discard Ta Tn VDISCARD DISCARD No character @ 1.34.20.1 log @Sync with HEAD. Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.35 2009/03/15 12:01:24 joerg Exp $ d380 2 a381 2 .Bl -column character Subscript Description .It control- Ta "" Ta "" d384 16 a399 16 .It eof Ta Tn VEOF Ta EOF No character .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 werase Ta Tn VWERASE Ta WERASE No character .It kill Ta Tn VKILL Ta KILL No character .It reprint Ta Tn VREPRINT Ta REPRINT No character .It intr Ta Tn VINTR Ta INTR No character .It quit Ta Tn VQUIT Ta QUIT No character .It susp Ta Tn VSUSP Ta SUSP No character .It dsusp Ta Tn VDSUSP Ta DSUSP No character .It start Ta Tn VSTART Ta START No character .It stop Ta Tn VSTOP Ta STOP No character .It lnext Ta Tn VLNEXT Ta LNEXT No character .It status Ta Tn VSTATUS Ta STATUS No character .It discard Ta Tn VDISCARD Ta DISCARD No character @ 1.33 log @Bump date for previous. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.32 2006/09/02 15:10:22 itohy Exp $ d35 1 a35 1 .Dd September 2, 2006 d595 2 a596 1 .Xr termios 4 @ 1.32 log @Add description on "discard" character. Sort control characters by the Vxxx numbers in termios.h. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.31 2004/04/01 16:10:03 tsarna Exp $ d35 1 a35 1 .Dd June 1, 1994 @ 1.31 log @Fix longstanding gap in stty functionality: while many operations had inverses, "sane" didn't. Now there is symmetry. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.30 2004/02/13 09:55:51 wiz Exp $ d389 2 a391 1 .It kill Ta Tn VKILL KILL No character d394 1 a396 1 .It dsusp Ta Tn VDSUSP DSUSP No character a397 1 .It reprint Ta Tn VREPRINT REPRINT No character d399 1 @ 1.30 log @Uppercase CPU. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.29 2003/08/07 09:05:42 agc Exp $ d437 2 @ 1.29 log @Move UCB-licensed code from 4-clause to 3-clause licence. Patches provided by Joel Baker in PR 22249, verified by myself. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.28 2003/07/01 10:24:41 wiz Exp $ d450 1 a450 1 and system times, percent cpu, and current memory usage. @ 1.28 log @Cm Fl -> Fl. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.27 2003/03/30 20:52:51 wiz Exp $ d17 1 a17 5 .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors @ 1.27 log @PDP-11 instead of PDP 11. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.26 2003/03/29 18:46:42 perry Exp $ d524 1 a524 1 .Cm Fl icanon . @ 1.26 log @Pdp 11 -> PDP 11, from Igor Sobrado in PR 19670 @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.25 2002/09/25 15:18:43 wiz Exp $ d263 1 a263 1 .Tn PDP 11/70 @ 1.25 log @New policy: New sentences start on a new line. Patches by Robert Elz , with minimal changes by me. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.24 2002/02/08 01:22:01 ross Exp $ d263 1 a263 1 .Tn Pdp 11/70 @ 1.24 log @Generate <>& symbolically. I'm avoiding .../dist/... directories for now. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.23 2001/12/20 20:08:25 wiz Exp $ d77 2 a78 2 rather than using standard input. The file is opened using the d97 2 a98 1 terminal. This corresponds to the c_cflag in the termios structure. d220 2 a221 1 (currently 255) characters in the input queue. If d225 2 a226 1 character to the output queue (the terminal beeps at you). Otherwise, d327 2 a328 2 is set, echo control characters as ^X. Otherwise control characters echo as themselves. d330 4 a333 2 For printing terminals. If set, echo erased characters backwards within ``\\'' and ``/''. Otherwise, disable this feature. d340 2 a341 2 for background output. This causes background jobs to stop if they attempt terminal output. d354 3 a356 3 If set, flow control output based on condition of Carrier Detect. Otherwise writes return an error if Carrier Detect is low (and Carrier is not being ignored with the d419 1 a419 2 Set the current terminal characteristics to the saved settings d424 1 a424 2 Enable parenb and cs7; disable parodd. d438 1 a438 2 characters back to system defaults. d450 2 a451 1 character (usually set to ^T). The status line consists of the d483 4 a486 3 is performed. If unset, change the modes of the terminal to some reasonable state that performs input and output processing. Note that since the terminal driver no longer has a single d602 2 a603 1 compatible. The flags @ 1.23 log @Punctuation nits, use Bd -literal instead of .nf, drop unnecessary .Pps. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.22 2000/09/04 07:30:13 kleink Exp $ d590 1 a590 1 utility exits with a value of 0 if successful, and >0 if an error occurs. @ 1.22 log @For commands and utilities, use EXIT STATUS rather than RETURN VALUES as appropriate (and documented in mdoc(7)). @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.21 2000/08/28 02:11:06 hubertf Exp $ d95 1 a95 2 .Ss Control Modes: .Pp d153 1 a153 1 .Ss Input Modes: d229 1 a229 1 .Ss Output Modes: d255 1 a255 2 .Ss Local Modes: .Pp d361 1 a361 1 .Ss Control Characters: d411 1 a411 2 .Ss Combination Modes: .Pp d458 1 a458 1 .Cm columns. d491 1 a491 2 .nf d496 1 a496 2 .fi d501 1 a501 2 .Ss Compatibility Modes: .Pp d572 1 a572 2 .Ss Control operations: .Pp @ 1.21 log @Add 'RETURN VALUE' section header. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.20 1999/03/24 06:27:49 mycroft Exp $ d594 1 a594 1 .Sh RETURN VALUES @ 1.20 log @Remove spurious .ne's. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.19 1999/01/13 23:55:26 sommerfe Exp $ d594 1 a594 1 .Pp @ 1.20.10.1 log @Pull up to netbsd-1-5 branch, OK'd by thorpej: Log Message: > Add 'RETURN VALUE' section header. Files & Revisionis: > cvs rdiff -r1.19 -r1.20 basesrc/bin/cat/cat.1 > cvs rdiff -r1.12 -r1.13 basesrc/bin/chmod/chmod.1 > cvs rdiff -r1.14 -r1.15 basesrc/bin/cp/cp.1 > cvs rdiff -r1.8 -r1.9 basesrc/bin/dd/dd.1 > cvs rdiff -r1.9 -r1.10 basesrc/bin/echo/echo.1 > cvs rdiff -r1.11 -r1.12 basesrc/bin/expr/expr.1 > cvs rdiff -r1.25 -r1.26 basesrc/bin/ls/ls.1 > cvs rdiff -r1.10 -r1.11 basesrc/bin/mkdir/mkdir.1 > cvs rdiff -r1.23 -r1.24 basesrc/bin/mt/mt.1 > cvs rdiff -r1.12 -r1.13 basesrc/bin/mv/mv.1 > cvs rdiff -r1.16 -r1.17 basesrc/bin/pwd/pwd.1 > cvs rdiff -r1.9 -r1.10 basesrc/bin/rm/rm.1 > cvs rdiff -r1.11 -r1.12 basesrc/bin/rmdir/rmdir.1 > cvs rdiff -r1.35 -r1.36 basesrc/bin/sh/sh.1 > cvs rdiff -r1.11 -r1.12 basesrc/bin/sleep/sleep.1 > cvs rdiff -r1.20 -r1.21 basesrc/bin/stty/stty.1 @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.21 2000/08/28 02:11:06 hubertf Exp $ d594 1 a594 1 .Sh RETURN VALUES @ 1.19 log @Apply patch as found in PR1892 @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.18 1998/02/13 21:53:48 kleink Exp $ a128 1 .ne 1i a205 1 .ne 1i a310 1 .ne 1i a461 1 .ne 1i a546 1 .ne 1i @ 1.18 log @Add ONOCR and ONLRET output modes, from XPG4.2. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.17 1998/02/06 05:40:33 perry Exp $ d583 16 d615 2 a616 1 extensions to the standard. @ 1.17 log @macroize BSD, NetBSD, FreeBSD and misc cleanup @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.16 1997/10/20 08:53:29 enami Exp $ d253 4 @ 1.16 log @Fix .Nm usage. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.15 1997/10/20 08:08:10 scottr Exp $ d72 1 a72 1 .Tn BSD @ 1.15 log @Add support for DTR/CTS flow control, from Bill Studenmund. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.14 1997/04/02 03:13:17 kleink Exp $ d46 1 a46 1 .Nm stty d52 1 a52 1 .Nm stty d88 1 a88 1 .Nm stty d581 1 a581 1 .Nm stty d587 1 a587 1 .Nm stty @ 1.14 log @Implement OCRNL "\r" -> "\n" tty output translation. Fixes PR standards/3434. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.13 1997/03/13 05:03:45 mikel Exp $ d152 2 @ 1.13 log @tabs is the converse of oxtabs, not itself. pointed out by Geoff Wing in PR misc/3320. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.12 1997/03/08 13:29:57 mouse Exp $ d242 6 @ 1.12 log @alternate -> alternative, per PR 2643 @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.11 1996/11/11 00:18:50 lukem Exp $ d560 1 a560 1 .Cm tabs . @ 1.11 log @fix the the typos @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.10 1995/09/07 06:57:14 jtc Exp $ d331 1 a331 1 Use (do not use) an alternate word erase algorithm when processing d334 1 a334 1 This alternate algorithm considers sequences of @ 1.10 log @Sync with 4.4lite2 @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.9 1995/08/18 10:32:03 pk Exp $ d306 1 a306 1 not) visually erase the @ 1.9 log @.DV => .Dv (from Mark Weaver, PR#1370). @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.8 1995/07/25 19:37:51 jtc Exp $ d37 1 a37 1 .\" @@(#)stty.1 8.4 (Berkeley) 4/18/94 d39 1 a39 1 .Dd April 18, 1994 d129 1 d205 1 d301 1 d453 1 d539 1 @ 1.8 log @Use "utility" instead of "command". Modern definitions of these terms are distinct (See POSIX.2 glossary). A utility is a executable, script or shell builtin; while a command can be any of those things plus lists, pipelines, compound commands (if, for, while) and shell function definitions. @ text @d1 1 a1 1 .\" $NetBSD: stty.1,v 1.7 1995/03/21 09:11:27 cgd Exp $ d239 1 a239 1 .DV CR-NL @ 1.7 log @convert to new RCS id conventions. @ text @d1 1 a1 1 .\" $NetBSD$ d575 1 a575 1 function is expected to be @ 1.6 log @Merge with 4.4-Lite version. @ text @d1 2 d37 1 a37 2 .\" from: @@(#)stty.1 8.4 (Berkeley) 4/18/94 .\" $Id: $ @ 1.6.2.1 log @file stty.1 was added on branch netbsd-1-0 on 1994-09-20 04:52:12 +0000 @ text @d1 581 @ 1.6.2.2 log @Merge with 4.4-Lite version. @ text @a0 581 .\" Copyright (c) 1990, 1993, 1994 .\" The Regents of the University of California. All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" the Institute of Electrical and Electronics Engineers, Inc. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" from: @@(#)stty.1 8.4 (Berkeley) 4/18/94 .\" $Id: stty.1,v 1.6 1994/09/20 04:52:11 mycroft Exp $ .\" .Dd April 18, 1994 .Dt STTY 1 .Os .Sh NAME .Nm stty .Nd set the options for a terminal device interface .Sh SYNOPSIS .Nm stty .Op Fl a | Fl e | Fl g .Op Fl f Ar file .Op operands .Sh DESCRIPTION The .Nm stty utility sets or reports on terminal characteristics for the device that is its standard input. If no options or operands are specified, it reports the settings of a subset of characteristics as well as additional ones if they differ from their default values. Otherwise it modifies the terminal state according to the specified arguments. Some combinations of arguments are mutually exclusive on some terminal types. .Pp The following options are available: .Bl -tag -width Ds .It Fl a Display all the current settings for the terminal to standard output as per .St -p1003.2 . .It Fl e Display all the current settings for the terminal to standard output in the traditional .Tn BSD ``all'' and ``everything'' formats. .It Fl f Open and use the terminal named by .Ar file rather than using standard input. The file is opened using the .Dv O_NONBLOCK flag of .Fn open , making it possible to set or display settings on a terminal that might otherwise block on the open. .It Fl g Display all the current settings for the terminal to standard output in a form that may be used as an argument to a subsequent invocation of .Nm stty to restore the current terminal state as per .St -p1003.2 . .El .Pp The following arguments are available to set the terminal characteristics: .Ss Control Modes: .Pp Control mode flags affect hardware characteristics associated with the terminal. This corresponds to the c_cflag in the termios structure. .Bl -tag -width Fl .It Cm parenb Pq Fl parenb Enable (disable) parity generation and detection. .It Cm parodd Pq Fl parodd Select odd (even) parity. .It Cm cs5 cs6 cs7 cs8 Select character size, if possible. .It Ar number Set terminal baud rate to the number given, if possible. If the baud rate is set to zero, modem control is no longer asserted. .It Cm ispeed Ar number Set terminal input baud rate to the number given, if possible. If the input baud rate is set to zero, the input baud rate is set to the value of the output baud rate. .It Cm ospeed Ar number Set terminal output baud rate to the number given, if possible. If the output baud rate is set to zero, modem control is no longer asserted. .It Cm speed Ar number This sets both .Cm ispeed and .Cm ospeed to .Ar number . .It Cm hupcl Pq Fl hupcl Stop asserting modem control (do not stop asserting modem control) on last close. .It Cm hup Pq Fl hup Same as hupcl .Pq Fl hupcl . .It Cm cstopb Pq Fl cstopb Use two (one) stop bits per character. .It Cm cread Pq Fl cread Enable (disable) the receiver. .It Cm clocal Pq Fl clocal Assume a line without (with) modem control. .It Cm crtscts Pq Fl crtscts Enable RTS/CTS flow control. .El .Ss Input Modes: This corresponds to the c_iflag in the termios structure. .Bl -tag -width Fl .It Cm ignbrk Pq Fl ignbrk Ignore (do not ignore) break on input. .It Cm brkint Pq Fl brkint Signal (do not signal) .Dv INTR on break. .It Cm ignpar Pq Fl ignpar Ignore (do not ignore) parity errors. .It Cm parmrk Pq Fl parmrk Mark (do not mark) parity errors. .It Cm inpck Pq Fl inpck Enable (disable) input parity checking. .It Cm istrip Pq Fl istrip Strip (do not strip) input characters to seven bits. .It Cm inlcr Pq Fl inlcr Map (do not map) .Dv NL to .Dv CR on input. .It Cm igncr Pq Fl igncr Ignore (do not ignore) .Dv CR on input. .It Cm icrnl Pq Fl icrnl Map (do not map) .Dv CR to .Dv NL on input. .It Cm ixon Pq Fl ixon Enable (disable) .Dv START/STOP output control. Output from the system is stopped when the system receives .Dv STOP and started when the system receives .Dv START , or if .Cm ixany is set, any character restarts output. .It Cm ixoff Pq Fl ixoff Request that the system send (not send) .Dv START/STOP characters when the input queue is nearly empty/full. .It Cm ixany Pq Fl ixany Allow any character (allow only .Dv START ) to restart output. .It Cm imaxbel Pq Fl imaxbel The system imposes a limit of .Dv MAX_INPUT (currently 255) characters in the input queue. If .Cm imaxbel is set and the input queue limit has been reached, subsequent input causes the system to send an ASCII BEL character to the output queue (the terminal beeps at you). Otherwise, if .Cm imaxbel is unset and the input queue is full, the next input character causes the entire input and output queues to be discarded. .El .Ss Output Modes: This corresponds to the c_oflag of the termios structure. .Bl -tag -width Fl .It Cm opost Pq Fl opost Post-process output (do not post-process output; ignore all other output modes). .It Cm onlcr Pq Fl onlcr Map (do not map) .Dv NL to .DV CR-NL on output. .It Cm oxtabs Pq Fl oxtabs Expand (do not expand) tabs to spaces on output. .El .Ss Local Modes: .Pp Local mode flags (lflags) affect various and sundry characteristics of terminal processing. Historically the term "local" pertained to new job control features implemented by Jim Kulp on a .Tn Pdp 11/70 at .Tn IIASA . Later the driver ran on the first .Tn VAX at Evans Hall, UC Berkeley, where the job control details were greatly modified but the structure definitions and names remained essentially unchanged. The second interpretation of the 'l' in lflag is ``line discipline flag'' which corresponds to the .Ar c_lflag of the .Ar termios structure. .Bl -tag -width Fl .It Cm isig Pq Fl isig Enable (disable) the checking of characters against the special control characters .Dv INTR , QUIT , and .Dv SUSP . .It Cm icanon Pq Fl icanon Enable (disable) canonical input .Pf ( Dv ERASE and .Dv KILL processing). .It Cm iexten Pq Fl iexten Enable (disable) any implementation defined special control characters not currently controlled by icanon, isig, or ixon. .It Cm echo Pq Fl echo Echo back (do not echo back) every character typed. .It Cm echoe Pq Fl echoe The .Dv ERASE character shall (shall not) visually erase the last character in the current line from the display, if possible. .It Cm echok Pq Fl echok Echo (do not echo) .Dv NL after .Dv KILL character. .It Cm echoke Pq Fl echoke The .Dv KILL character shall (shall not) visually erase the the current line from the display, if possible. .It Cm echonl Pq Fl echonl Echo (do not echo) .Dv NL , even if echo is disabled. .It Cm echoctl Pq Fl echoctl If .Cm echoctl is set, echo control characters as ^X. Otherwise control characters echo as themselves. .It Cm echoprt Pq Fl echoprt For printing terminals. If set, echo erased characters backwards within ``\\'' and ``/''. Otherwise, disable this feature. .It Cm noflsh Pq Fl noflsh Disable (enable) flush after .Dv INTR , QUIT , SUSP . .It Cm tostop Pq Fl tostop Send (do not send) .Dv SIGTTOU for background output. This causes background jobs to stop if they attempt terminal output. .It Cm altwerase Pq Fl altwerase Use (do not use) an alternate word erase algorithm when processing .Dv WERASE characters. This alternate algorithm considers sequences of alphanumeric/underscores as words. It also skips the first preceding character in its classification (as a convenience since the one preceding character could have been erased with simply an .Dv ERASE character.) .It Cm mdmbuf Pq Fl mdmbuf If set, flow control output based on condition of Carrier Detect. Otherwise writes return an error if Carrier Detect is low (and Carrier is not being ignored with the .Dv CLOCAL flag.) .It Cm flusho Pq Fl flusho Indicates output is (is not) being discarded. .It Cm pendin Pq Fl pendin Indicates input is (is not) pending after a switch from non-canonical to canonical mode and will be re-input when a read becomes pending or more input arrives. .El .Ss Control Characters: .Bl -tag -width Fl .It Ar control-character Ar string Set .Ar control-character to .Ar string . If string is a single character, the control character is set to that character. If string is the two character sequence "^-" or the string "undef" the control character is disabled (i.e. set to .Pf { Dv _POSIX_VDISABLE Ns } . ) .Pp Recognized control-characters: .Bd -ragged -offset indent .Bl -column character Subscript .It control- .It character Subscript Description .It _________ _________ _______________ .It eof Ta Tn VEOF EOF No character .It eol Ta Tn VEOL EOL No character .It eol2 Ta Tn VEOL2 EOL2 No character .It erase Ta Tn VERASE ERASE No character .It werase Ta Tn VWERASE WERASE No character .It intr Ta Tn VINTR INTR No character .It kill Ta Tn VKILL KILL No character .It quit Ta Tn VQUIT QUIT No character .It susp Ta Tn VSUSP SUSP No character .It start Ta Tn VSTART START No character .It stop Ta Tn VSTOP STOP No character .It dsusp Ta Tn VDSUSP DSUSP No character .It lnext Ta Tn VLNEXT LNEXT No character .It reprint Ta Tn VREPRINT REPRINT No character .It status Ta Tn VSTATUS STATUS No character .El .Ed .It Cm min Ar number .It Cm time Ar number Set the value of min or time to number. .Dv MIN and .Dv TIME are used in Non-Canonical mode input processing (-icanon). .El .Ss Combination Modes: .Pp .Bl -tag -width Fl .It Ar saved settings Set the current terminal characteristics to the saved settings produced by the .Fl g option. .It Cm evenp No or Cm parity Enable parenb and cs7; disable parodd. .It Cm oddp Enable parenb, cs7, and parodd. .It Fl parity , evenp , oddp Disable parenb, and set cs8. .It Cm \&nl Pq Fl \&nl Enable (disable) icrnl. In addition -nl unsets inlcr and igncr. .It Cm ek Reset .Dv ERASE and .Dv KILL characters back to system defaults. .It Cm sane Resets all modes to reasonable values for interactive terminal use. .It Cm tty Set the line discipline to the standard terminal line discipline .Dv TTYDISC . .It Cm crt Pq Fl crt Set (disable) all modes suitable for a CRT display device. .It Cm kerninfo Pq Fl kerninfo Enable (disable) the system generated status line associated with processing a .Dv STATUS character (usually set to ^T). The status line consists of the system load average, the current command name, its process ID, the event the process is waiting on (or the status of the process), the user and system times, percent cpu, and current memory usage. .It Cm columns Ar number The terminal size is recorded as having .Ar number columns. .It Cm cols Ar number is an alias for .Cm columns. .It Cm rows Ar number The terminal size is recorded as having .Ar number rows. .It Cm dec Set modes suitable for users of Digital Equipment Corporation systems ( .Dv ERASE , .Dv KILL , and .Dv INTR characters are set to ^?, ^U, and ^C; .Dv ixany is disabled, and .Dv crt is enabled.) .It Cm extproc Pq Fl extproc If set, this flag indicates that some amount of terminal processing is being performed by either the terminal hardware or by the remote side connected to a pty. .It Cm raw Pq Fl raw If set, change the modes of the terminal so that no input or output processing is performed. If unset, change the modes of the terminal to some reasonable state that performs input and output processing. Note that since the terminal driver no longer has a single .Dv RAW bit, it is not possible to intuit what flags were set prior to setting .Cm raw . This means that unsetting .Cm raw may not put back all the setting that were previously in effect. To set the terminal into a raw state and then accurately restore it, the following shell code is recommended: .nf save_state=$(stty -g) stty raw \&... stty "$save_state" .fi .It Cm size The size of the terminal is printed as two numbers on a single line, first rows, then columns. .El .Ss Compatibility Modes: .Pp These modes remain for compatibility with the previous version of the stty command. .Bl -tag -width Fl .It Cm all Reports all the terminal modes as with .Cm stty Fl a except that the control characters are printed in a columnar format. .It Cm everything Same as .Cm all . .It Cm cooked Same as .Cm sane . .It Cm cbreak If set, enables .Cm brkint , ixon , imaxbel , opost , .Cm isig , iexten , and .Cm Fl icanon . If unset, same as .Cm sane . .It Cm new Same as .Cm tty . .It Cm old Same as .Cm tty . .It Cm newcrt Pq Fl newcrt Same as .Cm crt . .It Cm pass8 The converse of .Cm parity . .It Cm tandem Pq Fl tandem Same as .Cm ixoff . .It Cm decctlq Pq Fl decctlq The converse of .Cm ixany . .It Cm crterase Pq Fl crterase Same as .Cm echoe . .It Cm crtbs Pq Fl crtbs Same as .Cm echoe . .It Cm crtkill Pq Fl crtkill Same as .Cm echoke . .It Cm ctlecho Pq Fl ctlecho Same as .Cm echoctl . .It Cm prterase Pq Fl prterase Same as .Cm echoprt . .It Cm litout Pq Fl litout The converse of .Cm opost . .It Cm tabs Pq Fl tabs The converse of .Cm tabs . .It Cm brk Ar value Same as the control character .Cm eol . .It Cm flush Ar value Same as the control character .Cm discard . .It Cm rprnt Ar value Same as the control character .Cm reprint . .El .Pp The .Nm stty utility exits with a value of 0 if successful, and >0 if an error occurs. .Sh SEE ALSO .Xr termios 4 .Sh STANDARDS The .Nm stty function is expected to be .St -p1003.2 compatible. The flags .Fl e and .Fl f are extensions to the standard. @ 1.5 log @Add RCS indentifiers. @ text @d1 2 a2 2 .\" Copyright (c) 1990 The Regents of the University of California. .\" All rights reserved. d35 1 a35 1 .\" from: @@(#)stty.1 6.13 (Berkeley) 6/27/91 d38 1 a38 1 .Dd June 27, 1991 d43 1 a43 1 .Nd Set the options for a terminal device interface. d50 1 a50 1 The d54 1 a54 1 If no options or operands are specified, it reports the settings of a set d65 2 a66 2 Display all the current settings for the terminal to standard output in the d69 1 a69 1 Display all the current settings for the terminal to standard output d74 10 a83 2 Display the current settings for the terminal named by .Ar file . d85 1 a85 1 Display all the current settings for the terminal to standard output d88 2 a89 1 to restore the current terminal state. d94 4 d128 7 d148 6 d199 4 a202 1 .Dv START . d210 20 d234 30 d298 7 d310 8 d321 36 a356 2 .It Cm control-character Ar string Set control-character to string. d363 2 a364 8 is set to .Pf { Dv _POSIX_VDISABLE Ns } if it is in effect for the device; if .Pf { Dv _POSIX_VDISABLE Ns } is not in effect for the device, it is an error. d369 1 a369 1 .It control- Ta Tn POSIX.1 d374 1 d376 1 d383 4 a388 6 .It Cm saved settings Set the current terminal characteristics to the saved settings produced by the .Fl g option. d399 10 d416 1 a416 1 .It Cm nl Pq Fl nl d432 132 d570 1 a570 1 .Xr stty 4 d576 6 a581 1 compatible. @ 1.4 log @rcsid cleanup @ text @d36 1 a36 1 .\" $Id: /b/source/CVS/src/bin/stty/stty.1,v 1.3 1993/03/23 00:30:25 cgd Exp $ @ 1.3 log @changed "Id" to "Header" for rcsids @ text @d35 2 a36 3 .\" @@(#)stty.1 6.13 (Berkeley) 6/27/91 .\" .\" $Header: stty.1,v 1.2 93/03/22 08:14:35 cgd Exp $ @ 1.2 log @added rcs ids to all files @ text @d37 1 a37 1 .\" $Id: stty.1,v 1.2 93/03/21 22:17:09 cgd Exp $ @ 1.1 log @Initial revision @ text @d37 2 @ 1.1.1.1 log @initial import of 386bsd-0.1 sources @ text @@ 1.1.1.2 log @Import original 4.4-Lite version. @ text @d1 2 a2 2 .\" Copyright (c) 1990, 1993, 1994 .\" The Regents of the University of California. All rights reserved. d35 1 a35 1 .\" @@(#)stty.1 8.4 (Berkeley) 4/18/94 d37 1 a37 1 .Dd April 18, 1994 d42 1 a42 1 .Nd set the options for a terminal device interface d49 1 a49 1 The d53 1 a53 1 If no options or operands are specified, it reports the settings of a subset d64 2 a65 2 Display all the current settings for the terminal to standard output as per d68 1 a68 1 Display all the current settings for the terminal to standard output d73 2 a74 10 Open and use the terminal named by .Ar file rather than using standard input. The file is opened using the .Dv O_NONBLOCK flag of .Fn open , making it possible to set or display settings on a terminal that might otherwise block on the open. d76 1 a76 1 Display all the current settings for the terminal to standard output d79 1 a79 2 to restore the current terminal state as per .St -p1003.2 . a83 4 .Ss Control Modes: .Pp Control mode flags affect hardware characteristics associated with the terminal. This corresponds to the c_cflag in the termios structure. a113 7 .It Cm speed Ar number This sets both .Cm ispeed and .Cm ospeed to .Ar number . a126 6 .It Cm crtscts Pq Fl crtscts Enable RTS/CTS flow control. .El .Ss Input Modes: This corresponds to the c_iflag in the termios structure. .Bl -tag -width Fl d172 1 a172 4 .Dv START , or if .Cm ixany is set, any character restarts output. a179 20 .It Cm ixany Pq Fl ixany Allow any character (allow only .Dv START ) to restart output. .It Cm imaxbel Pq Fl imaxbel The system imposes a limit of .Dv MAX_INPUT (currently 255) characters in the input queue. If .Cm imaxbel is set and the input queue limit has been reached, subsequent input causes the system to send an ASCII BEL character to the output queue (the terminal beeps at you). Otherwise, if .Cm imaxbel is unset and the input queue is full, the next input character causes the entire input and output queues to be discarded. .El .Ss Output Modes: This corresponds to the c_oflag of the termios structure. .Bl -tag -width Fl a183 30 .It Cm onlcr Pq Fl onlcr Map (do not map) .Dv NL to .DV CR-NL on output. .It Cm oxtabs Pq Fl oxtabs Expand (do not expand) tabs to spaces on output. .El .Ss Local Modes: .Pp Local mode flags (lflags) affect various and sundry characteristics of terminal processing. Historically the term "local" pertained to new job control features implemented by Jim Kulp on a .Tn Pdp 11/70 at .Tn IIASA . Later the driver ran on the first .Tn VAX at Evans Hall, UC Berkeley, where the job control details were greatly modified but the structure definitions and names remained essentially unchanged. The second interpretation of the 'l' in lflag is ``line discipline flag'' which corresponds to the .Ar c_lflag of the .Ar termios structure. .Bl -tag -width Fl a217 7 .It Cm echoke Pq Fl echoke The .Dv KILL character shall (shall not) visually erase the the current line from the display, if possible. a222 8 .It Cm echoctl Pq Fl echoctl If .Cm echoctl is set, echo control characters as ^X. Otherwise control characters echo as themselves. .It Cm echoprt Pq Fl echoprt For printing terminals. If set, echo erased characters backwards within ``\\'' and ``/''. Otherwise, disable this feature. d226 2 a227 36 .It Cm tostop Pq Fl tostop Send (do not send) .Dv SIGTTOU for background output. This causes background jobs to stop if they attempt terminal output. .It Cm altwerase Pq Fl altwerase Use (do not use) an alternate word erase algorithm when processing .Dv WERASE characters. This alternate algorithm considers sequences of alphanumeric/underscores as words. It also skips the first preceding character in its classification (as a convenience since the one preceding character could have been erased with simply an .Dv ERASE character.) .It Cm mdmbuf Pq Fl mdmbuf If set, flow control output based on condition of Carrier Detect. Otherwise writes return an error if Carrier Detect is low (and Carrier is not being ignored with the .Dv CLOCAL flag.) .It Cm flusho Pq Fl flusho Indicates output is (is not) being discarded. .It Cm pendin Pq Fl pendin Indicates input is (is not) pending after a switch from non-canonical to canonical mode and will be re-input when a read becomes pending or more input arrives. .El .Ss Control Characters: .Bl -tag -width Fl .It Ar control-character Ar string Set .Ar control-character to .Ar string . d234 8 a241 2 is disabled (i.e. set to .Pf { Dv _POSIX_VDISABLE Ns } . ) d246 1 a246 1 .It control- a250 1 .It eol2 Ta Tn VEOL2 EOL2 No character a251 1 .It werase Ta Tn VWERASE WERASE No character a257 4 .It dsusp Ta Tn VDSUSP DSUSP No character .It lnext Ta Tn VLNEXT LNEXT No character .It reprint Ta Tn VREPRINT REPRINT No character .It status Ta Tn VSTATUS STATUS No character d260 6 a275 10 .El .Ss Combination Modes: .Pp .Bl -tag -width Fl .It Ar saved settings Set the current terminal characteristics to the saved settings produced by the .Fl g option. d283 1 a283 1 .It Cm \&nl Pq Fl \&nl a298 132 .It Cm crt Pq Fl crt Set (disable) all modes suitable for a CRT display device. .It Cm kerninfo Pq Fl kerninfo Enable (disable) the system generated status line associated with processing a .Dv STATUS character (usually set to ^T). The status line consists of the system load average, the current command name, its process ID, the event the process is waiting on (or the status of the process), the user and system times, percent cpu, and current memory usage. .It Cm columns Ar number The terminal size is recorded as having .Ar number columns. .It Cm cols Ar number is an alias for .Cm columns. .It Cm rows Ar number The terminal size is recorded as having .Ar number rows. .It Cm dec Set modes suitable for users of Digital Equipment Corporation systems ( .Dv ERASE , .Dv KILL , and .Dv INTR characters are set to ^?, ^U, and ^C; .Dv ixany is disabled, and .Dv crt is enabled.) .It Cm extproc Pq Fl extproc If set, this flag indicates that some amount of terminal processing is being performed by either the terminal hardware or by the remote side connected to a pty. .It Cm raw Pq Fl raw If set, change the modes of the terminal so that no input or output processing is performed. If unset, change the modes of the terminal to some reasonable state that performs input and output processing. Note that since the terminal driver no longer has a single .Dv RAW bit, it is not possible to intuit what flags were set prior to setting .Cm raw . This means that unsetting .Cm raw may not put back all the setting that were previously in effect. To set the terminal into a raw state and then accurately restore it, the following shell code is recommended: .nf save_state=$(stty -g) stty raw \&... stty "$save_state" .fi .It Cm size The size of the terminal is printed as two numbers on a single line, first rows, then columns. .El .Ss Compatibility Modes: .Pp These modes remain for compatibility with the previous version of the stty command. .Bl -tag -width Fl .It Cm all Reports all the terminal modes as with .Cm stty Fl a except that the control characters are printed in a columnar format. .It Cm everything Same as .Cm all . .It Cm cooked Same as .Cm sane . .It Cm cbreak If set, enables .Cm brkint , ixon , imaxbel , opost , .Cm isig , iexten , and .Cm Fl icanon . If unset, same as .Cm sane . .It Cm new Same as .Cm tty . .It Cm old Same as .Cm tty . .It Cm newcrt Pq Fl newcrt Same as .Cm crt . .It Cm pass8 The converse of .Cm parity . .It Cm tandem Pq Fl tandem Same as .Cm ixoff . .It Cm decctlq Pq Fl decctlq The converse of .Cm ixany . .It Cm crterase Pq Fl crterase Same as .Cm echoe . .It Cm crtbs Pq Fl crtbs Same as .Cm echoe . .It Cm crtkill Pq Fl crtkill Same as .Cm echoke . .It Cm ctlecho Pq Fl ctlecho Same as .Cm echoctl . .It Cm prterase Pq Fl prterase Same as .Cm echoprt . .It Cm litout Pq Fl litout The converse of .Cm opost . .It Cm tabs Pq Fl tabs The converse of .Cm tabs . .It Cm brk Ar value Same as the control character .Cm eol . .It Cm flush Ar value Same as the control character .Cm discard . .It Cm rprnt Ar value Same as the control character .Cm reprint . d305 1 a305 1 .Xr termios 4 d311 1 a311 6 compatible. The flags .Fl e and .Fl f are extensions to the standard. @ 1.1.1.3 log @imported from 44lite2 @ text @d35 1 a35 1 .\" @@(#)stty.1 8.5 (Berkeley) 6/1/94 d37 1 a37 1 .Dd June 1, 1994 a126 1 .ne 1i a201 1 .ne 1i a296 1 .ne 1i a447 1 .ne 1i a532 1 .ne 1i @