]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - man/tset.1
ncurses 5.7 - patch 20101204
[ncurses.git] / man / tset.1
index 3a78b37b47badd8d5293e2546970008fd2b4a068..9743f5b5a7c8423fef4562c4941e2ec680032bb5 100644 (file)
@@ -1,5 +1,5 @@
 .\"***************************************************************************
-.\" Copyright (c) 1998-2000,2003 Free Software Foundation, Inc.              *
+.\" Copyright (c) 1998-2008,2010 Free Software Foundation, Inc.              *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
 .\" copy of this software and associated documentation files (the            *
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: tset.1,v 1.13 2003/05/11 00:32:53 tom Exp $
-.TH tset 1 ""
+.\" $Id: tset.1,v 1.25 2010/12/04 18:38:55 tom Exp $
+.TH @TSET@ 1 ""
 .SH NAME
-\fBtset\fR, \fBreset\fR - terminal initialization
+\fBtset\fR, \fBreset\fR \- terminal initialization
 .SH SYNOPSIS
-tset [\-IQVqrs] [\-] [\-e \fIch\fR] [\-i \fIch\fR] [\-k \fIch\fR] [\-m \fImapping\fR] [\fIterminal\fR]
+\fBtset\fR [\fB\-IQVcqrsw\fR] [\fB\-\fR] [\fB\-e\fR \fIch\fR] [\fB\-i\fR \fIch\fR] [\fB\-k\fR \fIch\fR] [\fB\-m\fR \fImapping\fR] [\fIterminal\fR]
 .br
-reset [\-IQVqrs] [\-] [\-e \fIch\fR] [\-i \fIch\fR] [\-k \fIch\fR] [\-m \fImapping\fR] [\fIterminal\fR]
+\fBreset\fR [\fB\-IQVcqrsw\fR] [\fB\-\fR] [\fB\-e\fR \fIch\fR] [\fB\-i\fR \fIch\fR] [\fB\-k\fR \fIch\fR] [\fB\-m\fR \fImapping\fR] [\fIterminal\fR]
 .SH DESCRIPTION
 \&\fBTset\fR initializes terminals.
 \fBTset\fR first determines the type of terminal that you are using.
@@ -44,14 +44,17 @@ This determination is done as follows, using the first terminal type found.
 2. The value of the \fBTERM\fR environmental variable.
 .PP
 3. (BSD systems only.) The terminal type associated with the standard
-error output device in the \fI/etc/ttys\fR file.  (On Linux and
-System-V-like UNIXes, \fIgetty\fR does this job by setting
+error output device in the \fI/etc/ttys\fR file.
+(On System\-V-like UNIXes and systems using that convention,
+\fIgetty\fR does this job by setting
 \fBTERM\fR according to the type passed to it by \fI/etc/inittab\fR.)
 .PP
 4. The default terminal type, ``unknown''.
 .PP
 If the terminal type was not specified on the command-line, the \fB\-m\fR
-option mappings are then applied (see below for more information).
+option mappings are then applied (see the section
+.B TERMINAL TYPE MAPPING
+for more information).
 Then, if the terminal type begins with a question mark (``?''), the
 user is prompted for confirmation of the terminal type.  An empty
 response confirms the type, or, another type can be entered to specify
@@ -65,6 +68,9 @@ and tab initialization strings are sent to the standard error output.
 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.
+Use the \fB\-c\fP or \fB\-w\fP option to select only the window sizing
+versus the other initialization.
+If neither option is given, both are assumed.
 .PP
 When invoked as \fBreset\fR, \fBtset\fR sets cooked and echo modes,
 turns off cbreak and raw modes, turns on newline translation and
@@ -72,32 +78,23 @@ resets any unset special characters to their default values before
 doing the terminal initialization described above.  This is useful
 after a program dies leaving a terminal in an abnormal state.  Note,
 you may have to type
-
+.sp
     \fB<LF>reset<LF>\fR
-
+.sp
 (the line-feed character is normally control-J) to get the terminal
 to work, as carriage-return may no longer work in the abnormal state.
 Also, the terminal will often not echo the command.
 .PP
 The options are as follows:
 .TP 5
-.B \-q
-The terminal type is displayed to the standard output, and the terminal is
-not initialized in any way.  The option `-' by itself is equivalent but
-archaic.
-.TP
+.B \-c
+Set control characters and modes.
 .B \-e
 Set the erase character to \fIch\fR.
 .TP
 .B \-I
 Do not send the terminal or tab initialization strings to the terminal.
 .TP
-.B \-Q
-Don't display any values for the erase, interrupt and line kill characters.
-.TP
-.B \-V
-reports the version of ncurses which was used in this program, and exits.
-.TP
 .B \-i
 Set the interrupt character to \fIch\fR.
 .TP
@@ -106,7 +103,19 @@ Set the line kill character to \fIch\fR.
 .TP
 .B \-m
 Specify a mapping from a port type to a terminal.
-See below for more information.
+See the section
+.B TERMINAL TYPE MAPPING
+for more information.
+.TP
+.B \-Q
+Do not display any values for the erase, interrupt and line kill characters.
+Normally \fBtset\fR displays the values for control characters which
+differ from the system's default values.
+.TP
+.B \-q
+The terminal type is displayed to the standard output, and the terminal is
+not initialized in any way.  The option `\-' by itself is equivalent but
+archaic.
 .TP
 .B \-r
 Print the terminal type to the standard error output.
@@ -114,11 +123,22 @@ Print the terminal type to the standard error output.
 .B \-s
 Print the sequence of shell commands to initialize the environment variable
 \fBTERM\fR to the standard output.
-See the section below on setting the environment for details.
+See the section
+.B SETTING THE ENVIRONMENT
+for details.
+.TP
+.B \-V
+reports the version of ncurses which was used in this program, and exits.
+.TP
+.B \-w
+Resize the window to match the size deduced via \fBsetupterm\fP.
+Normally this has no effect,
+unless \fBsetupterm\fP is not able to detect the window size.
 .PP
-The arguments for the \fB-e\fR, \fB-i\fR, and \fB-k\fR
+The arguments for the \fB\-e\fR, \fB\-i\fR, and \fB\-k\fR
 options may either be entered as actual characters or by using the `hat'
-notation, i.e. control-h may be specified as ``^H'' or ``^h''.
+notation, i.e., control-h may be specified as ``^H'' or ``^h''.
+.
 .SH SETTING THE ENVIRONMENT
 It is often desirable to enter the terminal type and information about
 the terminal's capabilities into the shell's environment.
@@ -131,9 +151,9 @@ are for \fBcsh\fR, otherwise, they are for \fBsh\fR.
 Note, the \fBcsh\fR commands set and unset the shell variable
 \fBnoglob\fR, leaving it unset.  The following line in the \fB.login\fR
 or \fB.profile\fR files will initialize the environment correctly:
-
+.sp
     eval \`tset \-s options ... \`
-
+.
 .SH 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
@@ -212,11 +232,11 @@ options were deleted from the \fBtset\fR
 utility in 4.4BSD.
 None of them were documented in 4.3BSD and all are
 of limited utility at best.
-The \fB\-a\fR, -\fB\d\fR, and -\fB\p\fR options are similarly
+The \fB\-a\fR, \fB\-d\fR, and \fB\-p\fR options are similarly
 not documented or useful, but were retained as they appear to be in
 widespread use.  It is strongly recommended that any usage of these
 three options be changed to use the \fB\-m\fR option instead.  The
--n option remains, but has no effect.  The \fB\-adnp\fR options are therefore
+\fB\-n\fP option remains, but has no effect.  The \fB\-adnp\fR options are therefore
 omitted from the usage summary above.
 .PP
 It is still permissible to specify the \fB\-e\fR, \fB\-i\fR, and \fB\-k\fR options without
@@ -224,11 +244,24 @@ arguments, although it is strongly recommended that such usage be fixed to
 explicitly specify the character.
 .PP
 As of 4.4BSD, executing \fBtset\fR as \fBreset\fR no longer implies the \fB\-Q\fR
-option.  Also, the interaction between the - option and the \fIterminal\fR
+option.  Also, the interaction between the \- option and the \fIterminal\fR
 argument in some historic implementations of \fBtset\fR has been removed.
 .SH ENVIRONMENT
-The \fBtset\fR command uses the \fBSHELL\fR and \fBTERM\fR
-environment variables.
+The \fBtset\fR command uses these environment variables:
+.TP 5
+SHELL
+tells \fBtset\fP whether to initialize \fBTERM\fP using \fBsh\fP or
+\fBcsh\fP syntax.
+.TP 5
+TERM
+Denotes your terminal type.
+Each terminal type is distinct, though many are similar.
+.TP 5
+TERMCAP
+may denote the location of a termcap database.
+If it is not an absolute pathname, e.g., begins with a `/',
+\fBtset\fP removes the variable from the environment before looking
+for the terminal description.
 .SH FILES
 .TP 5
 /etc/ttys
@@ -240,14 +273,11 @@ terminal capability database
 csh(1),
 sh(1),
 stty(1),
+curs_terminfo(3X),
 tty(4),
-termcap(5),
+terminfo(5),
 ttys(5),
 environ(7)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
-
+.PP
+This describes \fBncurses\fR
+version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).