now we can quote or escape #
[unix-history] / usr / src / usr.bin / window / window.1
CommitLineData
b532f234 1.\" @(#)window.1 3.1 83/08/09
93d5bf32
EW
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
f85ea165 12that are indistinguishable from real terminals to processes running in
93d5bf32
EW
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
f85ea165
EW
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.
e4414eae 22Initially a shell, usually \fIcsh (1)\fP, is placed in the window.
f85ea165 23.PP
e4414eae
EW
24Windows are labeled with the digits ``1'' through ``9'',
25thus a maximum of nine windows are supported.
93d5bf32 26One window, the current window, is treated specially.
f85ea165
EW
27This window is indicated by displaying its label in reverse video.
28.PP
29Windows can overlap. Some can be completely obscured by others.
bdfe3733 30The current window is always on top of all others.
93d5bf32 31.PP
f85ea165
EW
32The \fIwindow\fP program has two functional modes: command mode
33and conversation mode.
f85ea165 34In conversation mode, the terminal's
93d5bf32
EW
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.
f85ea165
EW
39Typing \fIwindow\fP's escape character (normally ^P)
40in conversation mode switches \fIwindow\fP into
93d5bf32 41command mode. In command mode, the top line of the
e4414eae
EW
42terminal screen becomes the command prompt window,
43and the cursor in the current window is replaced by a
f85ea165
EW
44blinking reverse video block (if these functions are supported
45by the terminal).
93d5bf32 46.PP
e4414eae
EW
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
93d5bf32
EW
57.TP
58.B [1-9]
f85ea165
EW
59Select window \fI[1-9]\fP as the current window
60and return to conversation mode.
93d5bf32
EW
61.TP
62.B %[1-9]
f85ea165 63Select window \fI[1-9]\fP but stay in command mode.
93d5bf32
EW
64.TP
65.B ?
66List a short summary of commands.
67.TP
f85ea165
EW
68.B ^L
69Redraw the screen.
70.TP
93d5bf32
EW
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
f85ea165 79character takes the place of ^P here.
93d5bf32 80.TP
f85ea165
EW
81.B q
82Exit \fIwindow\fP. Confirmation is requested.
93d5bf32
EW
83.TP
84.B w
f85ea165
EW
85Create a new window. You are prompted for the positions
86of the upper left and lower right corners of the window.
e4414eae
EW
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
f85ea165 92repeats the movement that number of times.
e4414eae 93Return enters the cursor position
93d5bf32
EW
94as the upper left corner of the window. The lower right corner
95is entered in the same manner. Typing escape (or ^[) at any
e4414eae 96point cancels this command.
93d5bf32 97.IP
f85ea165
EW
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.
93d5bf32
EW
101.IP
102This window is given the first available label.
103.TP
104.B c[1-9]
f85ea165
EW
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
93d5bf32
EW
107handle this signal correctly and cause no problems.
108.TP
109.B C
93d5bf32
EW
110Close all windows.
111.TP
f85ea165 112.B S
93d5bf32
EW
113Show all windows. Each window is brought to the top in sequence,
114with the terminal cursor placed on its label. Typing escape
e4414eae
EW
115at this point will select the displayed window as the current window.
116Return will display the next one. This command is useful
93d5bf32 117when there are a large number of windows and some are completely
f85ea165 118hidden by others.
93d5bf32
EW
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
f85ea165
EW
144.B :
145Enter a long command.
146.PP
e4414eae 147The long commands:
f85ea165
EW
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
e4414eae 163to the numeric label that is always displayed.
f85ea165
EW
164.TP
165.B %[1-9]
166Make window \fI[1-9]\fP the current window.
167.TP
168.B source file
e4414eae 169Read and execute the long commands in \fIfile\fP. Recursive
f85ea165
EW
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
e4414eae
EW
174commands contained in it are executed (using \fIsource\fP).
175If \fI.windowrc\fP does not exist, then two
f85ea165 176equal sized windows are created by default.
93d5bf32
EW
177.SH FILES
178.ta 15
f85ea165
EW
179~/.windowrc startup command file.
180.br
93d5bf32 181/dev/ptyp? pseudo-terminal devices.
93d5bf32
EW
182.SH DIAGNOSTICS
183Should be self explanatory.
184.SH BUGS
185When all pseudo-terminal devices are used, the \fB``w''\fP
f85ea165 186command fails mysteriously.
93d5bf32
EW
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.