]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - man/tset.1
ncurses 6.5 - patch 20240504
[ncurses.git] / man / tset.1
index 5f8457870bc73129fd595fc0b1e2ab9f280732d1..185227dcdb039007f5e58ac1c6ff94920056d872 100644 (file)
@@ -1,5 +1,5 @@
 .\"***************************************************************************
-.\" Copyright 2018-2022,2023 Thomas E. Dickey                                *
+.\" Copyright 2018-2023,2024 Thomas E. Dickey                                *
 .\" Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -27,8 +27,8 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: tset.1,v 1.75 2023/11/25 14:32:36 tom Exp $
-.TH @TSET@ 1 2023-11-25 "ncurses 6.4" "User commands"
+.\" $Id: tset.1,v 1.85 2024/04/27 17:57:47 tom Exp $
+.TH @TSET@ 1 2024-04-27 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands"
 .ie \n(.g \{\
 .ds `` \(lq
 .ds '' \(rq
@@ -57,7 +57,7 @@ initialize or reset terminal state
 .br
 \fB@RESET@\fP [\fB\-IQVcqrsw\fP] [\fB\-\fP] [\fB\-e\fP \fIch\fP] [\fB\-i\fP \fIch\fP] [\fB\-k\fP \fIch\fP] [\fB\-m\fP \fImapping\fP] [\fIterminal-type\fP]
 .SH DESCRIPTION
-.SS tset - initialization
+.SS "\fItset\fP \(em initialization"
 This program initializes terminals.
 .PP
 First, \fB@TSET@\fP retrieves the current terminal mode settings
@@ -81,13 +81,13 @@ This determination is done as follows, using the first terminal type found.
 .PP
 1. The \fBterminal\fP argument specified on the command line.
 .PP
-2. The value of the \fBTERM\fP environmental variable.
+2. The value of the \fITERM\fP environment variable.
 .PP
 3. (BSD systems only.) The terminal type associated with the standard
 error output device in the \fI/etc/ttys\fP file.
-(On System\-V-like Unices and systems using that convention,
-\fBgetty\fP(1) does this job by setting
-\fBTERM\fP according to the type passed to it by \fI/etc/inittab\fP.)
+(On System\ V hosts and systems using that convention,
+\fI\%getty\fP(8) does this job by setting
+\fITERM\fP according to the type passed to it by \fI\%/etc/inittab\fP.)
 .PP
 4. The default terminal type, \*(``unknown\*('',
 is not suitable for curses applications.
@@ -111,8 +111,10 @@ if the \*(``\fB\-w\fP\*('' option is enabled, \fB@TSET@\fP may update
 the terminal's window size.
 .IP
 If the window size cannot be obtained from the operating system,
-but the terminal description (or environment, e.g., \fBLINES\fP
-and \fBCOLUMNS\fP variables specify this),
+but the terminal description
+(or environment,
+e.g.,
+\fILINES\fP and \fI\%COLUMNS\fP variables specify this),
 use this to set the operating system's notion of the window size.
 .bP
 if the \*(``\fB\-c\fP\*('' option is enabled,
@@ -127,7 +129,7 @@ and \fB@TSET@\fP waits one second (in case a hardware reset was issued).
 Finally, if the erase, interrupt and line kill characters have changed,
 or are not set to their default values, their values are displayed to the
 standard error output.
-.SS reset - reinitialization
+.SS "\fIreset\fP \(em reinitialization"
 When invoked as \fB@RESET@\fP, \fB@TSET@\fP sets the terminal
 modes to \*(``sane\*('' values:
 .bP
@@ -162,11 +164,13 @@ This is done using the \fB\-s\fP option.
 .PP
 When the \fB\-s\fP option is specified, the commands to enter the information
 into the shell's environment are written to the standard output.
-If
-the \fBSHELL\fP environmental variable ends in \*(``csh\*('', the commands
-are for \fBcsh\fP, otherwise, they are for \fBsh\fP(1).
-Note, the \fBcsh\fP commands set and unset the shell variable
-\fBnoglob\fP, leaving it unset.
+If the \fISHELL\fP environment variable ends in \*(``csh\*('',
+the commands
+are for \fIcsh\fP(1),
+otherwise,
+they are for \fIsh\fP(1).
+The \fIcsh\fP commands set and unset the shell variable \fBnoglob\fP,
+leaving it unset.
 The following line in the \fB.login\fP
 or \fB.profile\fP files will initialize the environment correctly:
 .sp
@@ -175,7 +179,7 @@ or \fB.profile\fP files will initialize the environment correctly:
 .SS "Terminal Type Mapping"
 When the terminal is not hardwired into the system (or the current
 system information is incorrect) the terminal type derived from the
-\fI/etc/ttys\fP file or the \fBTERM\fP environmental variable is often
+\fI/etc/ttys\fP file or the \fITERM\fP environment variable is often
 something generic like \fBnetwork\fP, \fBdialup\fP, or \fBunknown\fP.
 When \fB@TSET@\fP is used in a startup script it is often desirable to
 provide information about the type of terminal used on such ports.
@@ -232,8 +236,8 @@ terminal.
 No whitespace characters are permitted in the \fB\-m\fP option argument.
 Also, to avoid problems with meta-characters, it is suggested that the
 entire \fB\-m\fP option argument be placed within single quote characters,
-and that \fBcsh\fP users insert a backslash character (\*(``\e\*('') before
-any exclamation marks (\*(``!\*('').
+and that \fIcsh\fP users insert a backslash character (\*(``\e\*('')
+before any exclamation marks (\*(``!\*('').
 .SH OPTIONS
 The options are as follows:
 .TP 5
@@ -271,11 +275,12 @@ Print the terminal type to the standard error output.
 .TP
 .B \-s
 Print the sequence of shell commands to initialize the environment variable
-\fBTERM\fP to the standard output;
+\fITERM\fP to the standard output;
 see subsection \*(``Setting the Environment\*(''.
 .TP
 .B \-V
-reports the version of ncurses which was used in this program, and exits.
+reports the version of \fI\%ncurses\fP which was used in this program,
+and exits.
 .TP
 .B \-w
 Resize the window to match the size deduced via \fBsetupterm\fP(3X).
@@ -291,22 +296,22 @@ If neither \fB\-c\fP or \fB\-w\fP is given, both options are assumed.
 .SH ENVIRONMENT
 The \fB@TSET@\fP command uses these environment variables:
 .TP 5
-SHELL
-tells \fB@TSET@\fP whether to initialize \fBTERM\fP using \fBsh\fP(1) or
-\fBcsh\fP(1) syntax.
+.I SHELL
+tells \fB@TSET@\fP whether to initialize \fITERM\fP using \fIsh\fP(1) or
+\fIcsh\fP(1) syntax.
 .TP 5
-TERM
+.I TERM
 Denotes your terminal type.
 Each terminal type is distinct, though many are similar.
 .TP 5
-TERMCAP
+.I TERMCAP
 may denote the location of a termcap database.
 If it is not an absolute pathname, e.g., begins with a \*(``/\*('',
 \fB@TSET@\fP removes the variable from the environment before looking
 for the terminal description.
 .SH FILES
-.TP 5
-/etc/ttys
+.TP
+.I /etc/ttys
 system port name to terminal type mapping database (BSD versions only).
 .TP
 .I \*d
@@ -324,21 +329,24 @@ However, each of those systems still provides \fBtset\fP.
 In fact, the commonly-used \fBreset\fP utility
 is always an alias for \fBtset\fP.
 .PP
-The \fB@TSET@\fP utility provides for backward-compatibility with BSD
-environments (under most modern Unices, \fB/etc/inittab\fP and \fBgetty\fP(1)
-can set \fBTERM\fP appropriately for each dial-up line; this obviates what was
-\fB@TSET@\fP's most important use).
-This implementation behaves like 4.4BSD
-\fBtset\fP, with a few exceptions specified here.
+The \fB\%@TSET@\fP utility provides backward compatibility with BSD
+environments;
+under most modern Unices,
+\fI\%/etc/inittab\fP and \fI\%getty\fP(8) can set \fITERM\fP
+appropriately for each dial-up line,
+obviating what was \fB\%@TSET@\fP's most important use.
+This implementation behaves like 4.4BSD \fBtset\fP,
+with a few exceptions we shall consider now.
 .PP
 A few options are different
-because the \fBTERMCAP\fP variable
-is no longer supported under terminfo-based \fBncurses\fP:
+because the \fI\%TERMCAP\fP variable
+is no longer supported under terminfo-based \fI\%ncurses\fP:
 .bP
 The \fB\-S\fP option of BSD \fBtset\fP no longer works;
 it prints an error message to the standard error and dies.
 .bP
-The \fB\-s\fP option only sets \fBTERM\fP, not \fBTERMCAP\fP.
+The \fB\-s\fP option only sets \fITERM\fP,
+not \fI\%TERMCAP\fP.
 .PP
 There was an undocumented 4.4BSD feature
 that invoking \fBtset\fP via a link named
@@ -382,23 +390,26 @@ In 4.4BSD, \fBtset\fP uses the window size from the termcap description
 to set the window size if \fBtset\fP is not able to obtain the window
 size from the operating system.
 .bP
-In ncurses, \fB@TSET@\fP obtains the window size using
-\fBsetupterm\fP, which may be from
+In \fI\%ncurses\fP, \fB@TSET@\fP obtains the window size using
+\fB\%setupterm\fP(3X), which may be from
 the operating system,
-the \fBLINES\fP and \fBCOLUMNS\fP environment variables or
+the \fILINES\fP and \fICOLUMNS\fP environment variables or
 the terminal description.
 .PP
-Obtaining the window size from the terminal description is common to
-both implementations, but considered obsolescent.
+Obtaining the window size from a terminal's type description is common
+to both implementations,
+but considered obsolescent.
 Its only practical use is for hardware terminals.
-Generally speaking, a window size would be unset only if there were
-some problem obtaining the value from the operating system
-(and \fBsetupterm\fP would still fail).
-For that reason, the \fBLINES\fP and \fBCOLUMNS\fP environment variables
-may be useful for working around window-size problems.
-Those have the drawback that if the window is resized,
-those variables must be recomputed and reassigned.
-To do this more easily, use the \fBresize\fP(1) program.
+Generally,
+the window size will remain uninitialized only if there were a problem
+obtaining the value from the operating system
+(and \fB\%setupterm\fP would still fail).
+The \fILINES\fP and \fI\%COLUMNS\fP environment variables
+may thus be useful for working around window-size problems,
+but have the drawback that if the window is resized,
+their values must be recomputed and reassigned.
+The \fI\%resize\fP(1) program distributed with
+\fI\%xterm\fP(1) assists this activity.
 .SH HISTORY
 A \fB\%reset\fP command written by Kurt Shoens appeared in 1BSD
 (March 1978).