Copyright 1998-2017,2019 by Thomas E. Dickey
All Rights Reserved
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name(s) of the above copyright
holders shall not be used in advertising or otherwise to promote the
sale, use or other dealings in this Software without prior written
authorization.
updated by Thomas E. Dickey for XFree86, 1998-2006.
Bulleted paragraph
.. Escape single quotes in literal strings from groff's Unicode transform.
\*N determines the command through several steps: .bP first, it finds the name of the user's shell program. It uses the SHELL variable if set, otherwise it uses the user's data from /etc/passwd. .bP then it decides whether to use Bourne shell syntax or C-Shell syntax. It uses a built-in table of known shells, which can be overridden by the -u and -c options. .bP then \*n asks the operating system for the terminal settings. This is the same information which can be manipulated using stty. .bP then \*n asks the terminal for its size in characters. Depending on whether the "-s option is given, \*n uses a different escape sequence to ask for this information. .bP at this point, \*n attempts to update the terminal settings to reflect the terminal window's size in pixels:
.bP if the -s option is used, \*n then asks the terminal for its size in pixels. .bP otherwise, \*n asks the operating system for the information and updates that after ensuring that the window's dimensions are a multiple of the character height and width. .bP in either case, the updated terminal settings are done using a different system call than used for stty.
% alias rs \*(AQset noglob; eval \`\*n\`\*(AQAfter resizing the window, the user would type:
% rsUsers of versions of the Bourne shell (usually known as /bin/sh) that don't have command functions will need to send the output to a temporary file and then read it back in with the \*(``.\*('' command:
$ \*n > /tmp/out $ .\0/tmp/out
8 -c This option indicates that C shell commands should be generated even if the user's current shell does not appear to use C shell syntax.
8 -s [rows columns] This option indicates that Sun console escape sequences will be used instead of the VT100-style xterm escape codes. If rows and columns are given, \*n will ask the xterm to resize itself using those values.
Both of the escape sequences used for this option (first to obtain the window size and second to modify it) are subject to xterm's allowWindowOps resource setting. The window manager may also choose to disallow the change. The VT100-style escape sequence used to determine the screen size always works for VT100-compatible terminals. VT100s have no corresponding way to modify the screensize.8 -u This option indicates that Bourne shell commands should be generated even if the user's current shell does not appear to use Bourne shell syntax.
8 -v This causes \*n to print a version number to the standard output, and then exit.
Note that the Sun console escape sequences are recognized by XFree86 xterm and by dtterm. The \*n program may be installed as sunsize, which causes makes it assume the -s option.
The rows and columns arguments must appear last; though they are normally associated with the -s option, they are parsed separately.
15 /etc/termcap for the base termcap entry to modify.
15 ~/.cshrc user's alias for the command.
15 SHELL Unless overridden by the -c option, \*n determines the user's current shell by
.bP first checking if $SHELL is set, and using that, .bP otherwise \*n looks in the password file (/etc/passwd).
15 TERM \*N 's generated shell command sets this to "__default_termname__" if not already set.
15 TERMCAP \*N 's generated shell command sets this variable on systems using termcap, e.g., when \*n is linked with the termcap library rather than a terminfo library. The latter does not provide the complete text for a termcap entry.
15 COLUMNS, LINES \*N 's generated shell command sets these variables on systems using terminfo. Many applications (including the curses library) use those variables when set to override their screensize.
csh(1), stty(1), tset(1)
xterm(__mansuffix__)
Thomas Dickey (invisible-island.net).
Copyright (c) 1984, 1985 by X Consortium
See X (__miscmansuffix__) for a complete copyright notice.