tset.1 (1591) | tset.1 (28370) |
---|---|
1.\" Copyright (c) 1985, 1990, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 56 unchanged lines hidden (view full) --- 65.Bl -bullet -compact -offset indent 66.It 67The 68.Ar terminal 69argument specified on the command line. 70.It 71The value of the 72.Ev TERM | 1.\" Copyright (c) 1985, 1990, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 56 unchanged lines hidden (view full) --- 65.Bl -bullet -compact -offset indent 66.It 67The 68.Ar terminal 69argument specified on the command line. 70.It 71The value of the 72.Ev TERM |
73environmental variable. | 73environment variable. |
74.It 75The terminal type associated with the standard error output device in the 76.Pa /etc/ttys 77file. 78.It 79The default terminal type, ``unknown''. 80.El 81.Pp --- 13 unchanged lines hidden (view full) --- 95and line kill characters (among many other things) are set and the terminal 96and tab initialization strings are sent to the standard error output. 97Finally, if the erase, interrupt and line kill characters have changed, 98or are not set to their default values, their values are displayed to the 99standard error output. 100.Pp 101When invoked as 102.Nm reset , | 74.It 75The terminal type associated with the standard error output device in the 76.Pa /etc/ttys 77file. 78.It 79The default terminal type, ``unknown''. 80.El 81.Pp --- 13 unchanged lines hidden (view full) --- 95and line kill characters (among many other things) are set and the terminal 96and tab initialization strings are sent to the standard error output. 97Finally, if the erase, interrupt and line kill characters have changed, 98or are not set to their default values, their values are displayed to the 99standard error output. 100.Pp 101When invoked as 102.Nm reset , |
103.Nm tset | 103.Nm |
104sets cooked and echo modes, turns off cbreak and raw modes, turns on 105newline translation and resets any unset special characters to their 106default values before doing the terminal initialization described above. 107This is useful after a program dies leaving a terminal in a abnormal state. 108Note, you may have to type 109.Dq Li <LF>reset<LF> 110(the line-feed character is normally control-J) to get the terminal 111to work, as carriage-return may no longer work in the abnormal state. --- 66 unchanged lines hidden (view full) --- 178users and then used like any other shell array. 179.Pp 180When the 181.Fl s 182option is specified, the commands to enter the information into the 183shell's environment are written to the standard output. 184If the 185.Ev SHELL | 104sets cooked and echo modes, turns off cbreak and raw modes, turns on 105newline translation and resets any unset special characters to their 106default values before doing the terminal initialization described above. 107This is useful after a program dies leaving a terminal in a abnormal state. 108Note, you may have to type 109.Dq Li <LF>reset<LF> 110(the line-feed character is normally control-J) to get the terminal 111to work, as carriage-return may no longer work in the abnormal state. --- 66 unchanged lines hidden (view full) --- 178users and then used like any other shell array. 179.Pp 180When the 181.Fl s 182option is specified, the commands to enter the information into the 183shell's environment are written to the standard output. 184If the 185.Ev SHELL |
186environmental variable ends in ``csh'', the commands are for the | 186environment variable ends in ``csh'', the commands are for the |
187.Nm csh , 188otherwise, they are for 189.Xr sh . 190Note, the 191.Nm csh 192commands set and unset the shell variable 193.Dq noglob , 194leaving it unset. --- 20 unchanged lines hidden (view full) --- 215unset noglob 216.Ed 217.Sh TERMINAL TYPE MAPPING 218When the terminal is not hardwired into the system (or the current system 219information is incorrect) the terminal type derived from the 220.Pa /etc/ttys 221file or the 222.Ev TERM | 187.Nm csh , 188otherwise, they are for 189.Xr sh . 190Note, the 191.Nm csh 192commands set and unset the shell variable 193.Dq noglob , 194leaving it unset. --- 20 unchanged lines hidden (view full) --- 215unset noglob 216.Ed 217.Sh TERMINAL TYPE MAPPING 218When the terminal is not hardwired into the system (or the current system 219information is incorrect) the terminal type derived from the 220.Pa /etc/ttys 221file or the 222.Ev TERM |
223environmental variable is often something generic like | 223environment variable is often something generic like |
224.Dq network , 225.Dq dialup , 226or 227.Dq unknown . 228When | 224.Dq network , 225.Dq dialup , 226or 227.Dq unknown . 228When |
229.Nm tset | 229.Nm |
230is used in a startup script 231.Pf ( Pa .profile 232for 233.Xr sh 1 234users or 235.Pa .login 236for 237.Xr csh 1 238users) it is often desirable to provide information about the type of 239terminal used on such ports. 240The purpose of the 241.Fl m 242option is to 243.Dq map 244from some set of conditions to a terminal type, that is, to 245tell | 230is used in a startup script 231.Pf ( Pa .profile 232for 233.Xr sh 1 234users or 235.Pa .login 236for 237.Xr csh 1 238users) it is often desirable to provide information about the type of 239terminal used on such ports. 240The purpose of the 241.Fl m 242option is to 243.Dq map 244from some set of conditions to a terminal type, that is, to 245tell |
246.Nm tset | 246.Nm |
247``If I'm on this port at a particular speed, guess that I'm on that 248kind of terminal''. 249.Pp 250The argument to the 251.Fl m 252option consists of an optional port type, an optional operator, an optional 253baud rate specification, an optional colon (``:'') character and a terminal 254type. --- 60 unchanged lines hidden (view full) --- 315Also, to avoid problems with metacharacters, it is suggested that the entire 316.Fl m 317option argument be placed within single quote characters, and that 318.Nm csh 319users insert a backslash character (``\e'') before any exclamation 320marks (``!''). 321.Sh ENVIRONMENT 322The | 247``If I'm on this port at a particular speed, guess that I'm on that 248kind of terminal''. 249.Pp 250The argument to the 251.Fl m 252option consists of an optional port type, an optional operator, an optional 253baud rate specification, an optional colon (``:'') character and a terminal 254type. --- 60 unchanged lines hidden (view full) --- 315Also, to avoid problems with metacharacters, it is suggested that the entire 316.Fl m 317option argument be placed within single quote characters, and that 318.Nm csh 319users insert a backslash character (``\e'') before any exclamation 320marks (``!''). 321.Sh ENVIRONMENT 322The |
323.Nm tset | 323.Nm |
324command utilizes the 325.Ev SHELL 326and 327.Ev TERM 328environment variables. 329.Sh FILES 330.Bl -tag -width /usr/share/misc/termcap -compact 331.It Pa /etc/ttys --- 6 unchanged lines hidden (view full) --- 338.Xr sh 1 , 339.Xr stty 1 , 340.Xr tty 4 , 341.Xr termcap 5 , 342.Xr ttys 5 , 343.Xr environ 7 344.Sh HISTORY 345The | 324command utilizes the 325.Ev SHELL 326and 327.Ev TERM 328environment variables. 329.Sh FILES 330.Bl -tag -width /usr/share/misc/termcap -compact 331.It Pa /etc/ttys --- 6 unchanged lines hidden (view full) --- 338.Xr sh 1 , 339.Xr stty 1 , 340.Xr tty 4 , 341.Xr termcap 5 , 342.Xr ttys 5 , 343.Xr environ 7 344.Sh HISTORY 345The |
346.Nm tset | 346.Nm |
347command appeared in 348.Bx 3.0 . 349.Sh COMPATIBILITY 350The 351.Fl A , 352.Fl E , 353.Fl h , 354.Fl u 355and 356.Fl v 357options have been deleted from the | 347command appeared in 348.Bx 3.0 . 349.Sh COMPATIBILITY 350The 351.Fl A , 352.Fl E , 353.Fl h , 354.Fl u 355and 356.Fl v 357options have been deleted from the |
358.Nm tset | 358.Nm |
359utility. 360None of them were documented in 4.3BSD and all are of limited utility at 361best. 362The 363.Fl a , 364.Fl d 365and 366.Fl p --- 10 unchanged lines hidden (view full) --- 377.Fl e , 378.Fl i 379and 380.Fl k 381options without arguments, although it is strongly recommended that such 382usage be fixed to explicitly specify the character. 383.Pp 384Executing | 359utility. 360None of them were documented in 4.3BSD and all are of limited utility at 361best. 362The 363.Fl a , 364.Fl d 365and 366.Fl p --- 10 unchanged lines hidden (view full) --- 377.Fl e , 378.Fl i 379and 380.Fl k 381options without arguments, although it is strongly recommended that such 382usage be fixed to explicitly specify the character. 383.Pp 384Executing |
385.Nm tset | 385.Nm |
386as 387.Nm reset 388no longer implies the 389.Fl Q 390option. 391Also, the interaction between the 392.Fl 393option and the 394.Ar terminal 395argument in some historic implementations of | 386as 387.Nm reset 388no longer implies the 389.Fl Q 390option. 391Also, the interaction between the 392.Fl 393option and the 394.Ar terminal 395argument in some historic implementations of |
396.Nm tset | 396.Nm |
397has been removed. 398.Pp 399Finally, the | 397has been removed. 398.Pp 399Finally, the |
400.Nm tset | 400.Nm |
401implementation has been completely redone (as part of the addition to the 402system of a 403.St -p1003.1-88 404compliant terminal interface) and will no longer compile on systems with 405older terminal interfaces. | 401implementation has been completely redone (as part of the addition to the 402system of a 403.St -p1003.1-88 404compliant terminal interface) and will no longer compile on systems with 405older terminal interfaces. |