date and time created 83/08/09 18:37:52 by edward
[unix-history] / usr / src / usr.bin / window / window.1
... / ...
CommitLineData
1.\" @(#)window.1 1.4 83/08/09
2.TH WINDOW 1 local
3.SH NAME
4window \- multiple window shell
5.SH SYNOPSIS
6window
7.SH DESCRIPTION
8\fIWindow\fP provides a window oriented working environment
9on ordinary CRT terminals.
10.PP
11Windows are rectangular partitions on the physical terminal screen
12that are indistinguishable from real terminals to processes running in
13them. Their sizes and placement are determined at creation
14time. They are framed as necessary to mark the boundaries between
15windows. Each window, like terminals, has a cursor and a set of
16control functions. Most intelligent terminal functions such as line and
17character deletion and insertion are supported. A \fItermcap (5)\fP
18entry tailored to each window is passed on to its processes
19in the environment (see \fIenviron (8)\fP). A pseudo-terminal
20device (\fIpty (4)\fP) is allocated for each window. This becomes
21the standard input, output, and diagnostic output of the processes.
22Initially a shell, usually \fIcsh (1)\fP, is placed in the window.
23.PP
24Windows are labeled with the digits ``1'' through ``9'',
25thus a maximum of nine windows are supported.
26One window, the current window, is treated specially.
27This window is indicated by displaying its label in reverse video.
28.PP
29Windows can overlap. Some can be completely obscured by others.
30The current window is always on top of all others.
31.PP
32The \fIwindow\fP program has two functional modes: command mode
33and conversation mode.
34In conversation mode, the terminal's
35real cursor is placed at the cursor position of the current
36window and all keyboard input is sent to the process in that
37window. Output from windows is displayed at all times,
38even in command mode.
39Typing \fIwindow\fP's escape character (normally ^P)
40in conversation mode switches \fIwindow\fP into
41command mode. In command mode, the top line of the
42terminal screen becomes the command prompt window,
43and the cursor in the current window is replaced by a
44blinking reverse video block (if these functions are supported
45by the terminal).
46.PP
47There are two types of commands. Short commands are
48usually one or two key strokes. Long commands are entered
49in the command window and terminated with carriage return
50or line feed (see the ``:'' command below). They consist
51of words separated by spaces or tabs. Words can be quoted
52to include the spacing characters. The ``\\'' convention
53of \fIC\fP applies. Alternately, long commands can be read
54in from files and executed (see \fIsource\fP below).
55.PP
56The short commands are
57.TP
58.B [1-9]
59Select window \fI[1-9]\fP as the current window
60and return to conversation mode.
61.TP
62.B %[1-9]
63Select window \fI[1-9]\fP but stay in command mode.
64.TP
65.B ?
66List a short summary of commands.
67.TP
68.B ^L
69Redraw the screen.
70.TP
71.B escape
72Return to conversation mode.
73.TP
74.B ^P
75Return to conversation mode and write ^P to the
76current window. Thus, typing two ^P's in conversation
77mode sends one to the current window. If the \fIwindow\fP
78escape is changed to some other character, that
79character takes the place of ^P here.
80.TP
81.B q
82Exit \fIwindow\fP. Confirmation is requested.
83.TP
84.B w
85Create a new window. You are prompted for the positions
86of the upper left and lower right corners of the window.
87The cursor is placed on the screen and the keys ``h'', ``j'',
88``k'', and ``l''
89move the cursor left, down, up, and right, respectively.
90The keys ``H'', ``J'', ``K'', and ``L'' move the cursor to the respective
91limits of the screen. Number before the movement keys
92repeats the movement that number of times.
93Return enters the cursor position
94as the upper left corner of the window. The lower right corner
95is entered in the same manner. Typing escape (or ^[) at any
96point cancels this command.
97.IP
98The environment variable SHELL is checked to find the
99name of the shell program to place in the window.
100\fICsh\fP (1) is used by default.
101.IP
102This window is given the first available label.
103.TP
104.B c[1-9]
105Close the window \fI[1-9]\fP. The process in the window is sent
106the hangup signal (see \fIkill (1)\fP). \fICsh (1)\fP should
107handle this signal correctly and cause no problems.
108.TP
109.B C
110Close all windows.
111.TP
112.B S
113Show all windows. Each window is brought to the top in sequence,
114with the terminal cursor placed on its label. Typing escape
115at this point will select the displayed window as the current window.
116Return will display the next one. This command is useful
117when there are a large number of windows and some are completely
118hidden by others.
119.TP
120.B ^U
121Scroll the current window up by half the window size.
122.TP
123.B ^D
124Scroll the current window down by half the window size.
125.TP
126.B ^B
127Scroll the current window up by the full window size.
128.TP
129.B ^F
130Scroll the current window down by the full window size.
131.TP
132.B h
133Move the cursor of the current window left by one column.
134.TP
135.B j
136Move the cursor of the current window down by one line.
137.TP
138.B k
139Move the cursor of the current window up by one line.
140.TP
141.B l
142Move the cursor of the current window right by one column.
143.TP
144.B :
145Enter a long command.
146.PP
147The long commands:
148.TP
149.B escape C
150Set the escape character to \fIC\fP.
151.TP
152.B terse [off]
153Turn on (or off) terse mode. In terse mode, the command window
154stays hidden even in command mode, and errors are reported by
155sounding the terminal's bell.
156.TP
157.B window row col nrow ncol
158Open a window with upper left corner at \fIrow\fP, \fIcol\fP
159and size \fInrow\fP, \fIncol\fP.
160.TP
161.B label [1-9] string
162Label the window \fI[1-9]\fP with \fIstring\fP. This is in addition
163to the numeric label that is always displayed.
164.TP
165.B %[1-9]
166Make window \fI[1-9]\fP the current window.
167.TP
168.B source file
169Read and execute the long commands in \fIfile\fP. Recursive
170\fIsource\fP is not allowed.
171.PP
172When \fIwindow\fP starts up, the file \fI.windowrc\fP in the
173user's home directory is checked. If it exists, then the
174commands contained in it are executed (using \fIsource\fP).
175If \fI.windowrc\fP does not exist, then two
176equal sized windows are created by default.
177.SH FILES
178.ta 15
179~/.windowrc startup command file.
180.br
181/dev/ptyp? pseudo-terminal devices.
182.SH DIAGNOSTICS
183Should be self explanatory.
184.SH BUGS
185When all pseudo-terminal devices are used, the \fB``w''\fP
186command fails mysteriously.
187.PP
188When a window is scrolled or the cursor moved, output from
189the process in the window will be displayed at the new cursor
190position. This is consistent with real terminals but
191not always desirable.