|
|
1.1 root 1: .ds [ [\\s-2
2: .ds ] \\s+2]
3: .ds _ \\v'+0u'\(ru\\v'-0u'\|
4: .ds * \\v'+18u'\s+2*\s0\\v'-18u'\"lower and larger
5: .if t .ds dg \\(dg
6: .if n .ds dg *
7: .if t .ds .3 .4v
8: .if n .ds .3 1v
9: .TH B 1 local
10: .tr **
11: .SH NAME
12: b \-
13: .I B
14: interpreter & environment
15: .SH SYNOPSIS
16: .TP 12n
17: .B b
18: Starts the
19: .I B
20: interpreter
21: .TP
22: .B "b \-e"
23: Starts the
24: .I B
25: interpreter, using the editor defined in the environment variable \%EDITOR
26: (\fIvi\fP default)
27: .TP
28: .BI "b\ " "file ..."
29: Makes the
30: .I B
31: interpreter execute the
32: .I B
33: commands in the named file or files.
34: Input for
35: .I READ
36: is taken from standard input.
37: .TP
38: .BI "b\ \-i\ " table
39: An empty permanent table
40: .I table
41: is created; standard input is read, and its lines (considered as texts)
42: are successively put in
43: .I "table[1], table[2], ..."
44: .TP
45: .BI "b\ \-o\ " table
46: The associates of the permanent table
47: .I table
48: are written to standard output, one to a line.
49: .TP
50: .B "b \-l"
51: The units in the workspace are listed
52: on the standard output.
53: .TP
54: .B "b \-p"
55: The units in the workspace are printed
56: on the system's printer.
57: .SH DESCRIPTION
58: A
59: .I B
60: `work-space' corresponds to a UNIX directory in which the units and
61: permanent targets are kept as separate files.
62: .PP
63: A call of
64: .I b
65: starts the
66: .I B
67: interpreter; commands can be entered and will be performed immediately.
68: The
69: .I B
70: system takes over control of the screen;
71: it reacts immediately to each key pressed.
72: There is a repertoire of editing operations
73: using function keys and control characters,
74: which may be used to edit the input.
75: A description of all editing operations is given in the User's Guide.
76: The manual entry
77: .IR bterminal (5)
78: tells you how the binding of the operations
79: to your terminal's keys can be changed.
80: Here we describe the basic mechanisms using the default key bindings,
81: as listed in the summary at the end.
82: .PP
83: When the first letter of a command is typed (upper case is not necessary),
84: a possible continuation is
85: .I suggested
86: on the display.
87: The suggestion can be accepted by pressing the \*[TAB\*] key;
88: this moves the cursor to the first
89: .I hole
90: (shown as `?') in the suggestion, or to the end of the line if there is none.
91: The suggestion can also be ignored; when more characters are typed
92: the suggestion is changed to conform to these, or removed if nothing applies.
93: .PP
94: When a command has been completed, it can be executed by pressing
95: \*[RETURN\*].
96: For control commands such as IF and FOR, \*[RETURN\*] moves the cursor
97: to an indented position on the next line, awaiting entry of the
98: `body' of the control command, which may consist of any number of lines.
99: When \*[RETURN\*]
100: is pressed twice in succession, this reduces the indentation level;
101: the command is executed when the indentation level is back to zero.
102: .PP
103: Corrections can be made by pressing the \*[BACKSPACE\*] key.
104: This cancels the effect of any key pressed, including \*[TAB\*]
105: and the editing operations, as well as \*[RETURN\*] within a control command.
106: Repetition of \*[BACKSPACE\*] cancels more keys,
107: to a maximum of 100 (currently).
108: Once execution of a command has started, it cannot be corrected,
109: though it can be stopped by pressing \*[BREAK\*] at any time.
110: If the copy-buffer is empty (see the Copy command),
111: the last command executed, last input provided or last text deleted
112: is saved in the buffer, and can be retrieved with \*[control-C\*].
113: It may then be edited using standard editing operations.
114: .PP
115: When the user types the first line of a HOW\(fmTO-, YIELD- or
116: TEST-command, editing of the unit continues in a similar way to editing
117: an IF or FOR command.
118: The user can complete the unit through standard editing operations,
119: and finish by pressing \*[control-X\*] or several \*[RETURN\*]s.
120: Further commands can then be given.
121: .PP
122: An existing unit can be edited by typing, on the command level, a colon
123: .RB ( : )
124: followed by the unit name.
125: Similarly, an existing target can be edited by typing an equals-sign
126: .RB ( = )
127: followed by the target name.
128: The name may be left out in subsequent edit requests for the same object,
129: or for the unit that most recently caused an error message.
130: .PP
131: When a unit that is being edited gets longer than the screen size,
132: a scroll bar will be displayed at the bottom of the screen.
133: It shows approximately which part of the unit is visible on the screen.
134: If your terminal has the Goto operation, and you
135: .I goto
136: some place on the scroll bar, the
137: .I B
138: system will reposition the visible part of the unit accordingly.
139: .PP
140: A double colon
141: .RB ( :: )
142: given at the command level
143: lists the headings of the units in the present workspace.
144: Likewise, a double equals-sign
145: .RB ( == )
146: gives the names of the permanent targets.
147: .PP
148: A call of
149: .B "b \-e"
150: starts the
151: .I B
152: interpreter, but uses the editor defined by the environment
153: variable \%EDITOR.
154: If this is not set then
155: .I vi
156: is used.
157: The editor is then only used for entering units, or editing existing units;
158: immediate commands cannot be edited.
159: .PP
160: The other calls of
161: .I b
162: do not activate the interpreter, but provide communication between the
163: workspace and UNIX, as described above in the synopsis.
164: .SH FILES
165: .ta 4c
166: .nf
167: \&$HOME/.Bed\*_buf copy buffer (if locked) between sessions
168: \&$HOME/.Bed\*_pos focus position of last 50 edited units
169: \&.b\*_perm table mapping object names to file names
170: \&.b\*_temp scratch file
171: \&.Bed\*_sugg suggestion list for user-defined commands
172: \&\(fm*, <\**, "\**, >\** units in this workspace
173: =\** permanent targets in this workspace
174: .fi
175: .SH SEE ALSO
176: .in +.5i
177: .ti -.5i
178: bterminal(5)
179: .sp .3v
180: .ti -.5i
181: Lambert Meertens,
182: .I "Draft Proposal for the B Programming Language; Semi-formal Definition,"
183: Mathematical Centre, 1982.
184: .ti -.5i
185: Lambert Meertens and Steven Pemberton,
186: .I "Description of B,"
187: CWI (\%formerly \%Mathematical \%Centre), 1984.
188: Also: SIGPLAN Notices, Vol.
189: .BR 20 ,
190: No.2, February 1985.
191: .ti -.5i
192: Steven Pemberton,
193: .I "A User's Guide to the B System,"
194: CWI, 1984.
195: .ti -.5i
196: .I "B Quick Reference card."
197: Available from CWI.
198: .ti -.5i
199: Leo Geurts,
200: .I "Computer Programming for Beginners,"
201: .I "Introducing the B Language; Part 1,"
202: CWI, 1984.
203: (Also available in Dutch.)
204: .ti -.5i
205: Leo Geurts,
206: .I "An Overview of the B Programming Language,"
207: .I "or B without Tears,"
208: SIGPLAN Notices, Vol.
209: .BR 17 ,
210: No. 12, December 1982.
211: .SH AUTHORS
212: Frank van Dijk,
213: Leo Geurts,
214: Timo Krijnen,
215: Lambert Meertens,
216: Steven Pemberton,
217: Guido van Rossum
218: .fi
219: .bp
220: .SH SUMMARY OF EDITING OPERATIONS
221: .ta 2.5c 5.5c
222: .if n .ta 10 27
223: .nf
224: .sp \*(.3
225: Name Default Keys\*(dg Short description
226: .sp
227: Accept \*[TAB\*] Accept suggestion, focus to hole or end of line
228: Return \*[RETURN\*] Add line or decrease indentation
229: .sp \*(.3
230: Widen \fIf1\fP, \*[ESC\*] w Widen focus
231: First \fIf2\fP, \*[ESC\*] f Move focus to first contained item
232: Last \fIf3\fP, \*[ESC\*] l Move focus to last contained item
233: Extend \fIf4\fP, \*[ESC\*] e Extend focus (usually to the right)
234: .sp \*(.3
235: Upline \fIf5\fP, \*[ESC\*] u Move focus to whole line above
236: Previous \fIf6\fP, \*[ESC\*] p Move focus to previous item
237: Next \fIf7\fP, \*[ESC\*] n Move focus to next item
238: Downline \fIf8\fP, \*[ESC\*] d Move focus to whole line below
239: .sp \*(.3
240: Up \(ua, \*[ESC\*] U Make new hole, move up
241: Down \(da, \*[ESC\*] D Make new hole, move down
242: Left \(<-, \*[ESC\*] , Make new hole, move left
243: Right \(->, \*[ESC\*] . Make new hole, move right
244: .sp \*(.3
245: Goto \*[ctrl-G\*] New focus at cursor position
246: .sp \*(.3
247: Undo \*[BACKSPACE\*] Undo effect of last key pressed (may be repeated)
248: Redo \*[ctrl-U\*] Redo last UNDOne key (may be repeated)
249: .sp \*(.3
250: Delete \*[ctrl-D\*] Delete contents of focus (to buffer if empty)
251: Copy \*[ctrl-C\*] Copy buffer to hole, or focus to buffer
252: .sp \*(.3
253: Record \*[ctrl-R\*] Start/stop recording keystrokes
254: Play \*[ctrl-P\*] Play back recorded keystrokes
255: .sp \*(.3
256: Look \*[ctrl-L\*] Redisplay screen
257: Help \*[ESC\*]? Print summary of editing operations
258: .sp \*(.3
259: Exit \*[ctrl-X\*] Finish changes or execute command
260: Interrupt \*[BREAK\*], \*[DEL\*] Interrupt command execution
261: .fi
262: .sp 2
263: \*(dg Notes:
264: .sp \*(.3
265: The binding of editing operations to keys may be different for your
266: terminal; see
267: .IR bterminal (5)
268: for more information.
269: .sp \*(.3
270: Keys named
271: .I f1...f8
272: are
273: .I "function keys."
274: The way to type these is terminal-dependent.
275: The codes they send must be defined by the termcap entry for your terminal.
276: See
277: .IR bterminal (5).
278: .sp \*(.3
279: If a terminal has arrow keys \(ua, \(<-, \(->, \(da which transmit codes to the computer,
280: these should be used for Up, Down, Left and Right.
281: Again, the termcap entry must define the codes.
282: .br
283: The Goto operation can only be used if the cursor can be moved
284: locally at the terminal;
285: the Goto operation will sense the terminal for the cursor position,
286: using two extra non-standard termcap capabilities; see
287: .IR bterminal (5)
288: for more details.
289: .sp \*(.3
290: If you have set your interrupt character with
291: .IR stty (1)
292: to something other than \*[DEL\*],
293: you can type \*[ctrl-]\*] for Interrupt.
294: .sp \*(.3
295: \*[Ctrl-D\*] means: hold the \*[CTRL\*] (or \*[CONTROL\*]) key down while pressing d.
296: .sp \*(.3
297: \&\*[ESC\*] w means: press the \*[ESC\*] key first, then w.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.