1 07/03/87 abbrev, ab
2
3 Syntax as a command: ab -control_args
4
5
6 Syntax as an active function: ab
7
8
9 Function: controls the expansion of abbreviations within Multics
10 command lines. As an active function, returns "true" if abbreviation
11 expansion of command lines is currently enabled and "false" otherwise.
12
13
14 Control arguments:
15 are accepted only when invoked as a command and may be chosen from:
16 -on
17 enables abbreviation expansion within subsequent command lines until
18 either the -off control argument or the abbrev quit request see
19 "List of abbrev requests" below is used. Default
20 -off
21 disables abbreviation expansion in subsequent command lines.
22
23
24 -profile path, -pf path
25 changes the pathname of the profile segment. The "profile" suffix
26 is assumed if not supplied. If the specified segment does not
27 exist, the user is queried for permission to create it. Default --
28 >udd>Project_id>Person_id>Person_id.profile
29 -escape STR, -esc STR
30 changes the abbrev escape character which is used to indicate that
31 a command line is actually a request line. STR must be a single,
32 non-blank character. STR remains in effect until process
33 termination, or the issuance of another -esc STR argument.
34 See "Notes on abbrev request lines" below. Default -- a period .
35
36
37 Notes:
38 When enabled, abbrev examines each command line before it is executed
39 by the command processor. If the line does not start with the abbrev
40 escape character, abbrev expands any abbreviations embedded in the line
41 and passes it to the command processor for execution.
42
43
44 Notes on break sequences:
45 When abbrev expands a command line, it treats certain character
46 sequences as special break sequences. An abbreviation cannot contain
47 break sequences. Any character string that is less than or equal to
48 eight characters long and is bounded by break sequences is a candidate
49 for expansion. Said string is looked up in the current profile segment
50 and, if it is found, the expanded form is placed in a copy of the
51 command line that is passed on to the normal command processor. For
52 the purpose of expansion, the beginning and end of the line are
53 considered as break sequences.
54
55
56 The following single character break sequences are recognized by
57 abbrev:
58
59 space horizontal tab newline
60 vertical tab formfeed
61
62 " $ ' ` . ; | < >
63
64 In addition, the archive component pathname delimiter is also
65 recognized as a break sequence. This two character sequence is:
66
67 ::
68
69
70 Notes on abbrev request lines:
71 Any line which begins with the abbrev escape character is treated as an
72 abbrev request line. The default escape character is a period . but
73 may be changed via the "-escape" control argument.
74
75
76 The abbrev request name must appear immediately following the abbrev
77 escape character without any intervening whitespace. In other words,
78 if the abbrev escape character is a period .,
79
80 .edit list
81
82 is the proper way to invoke the abbrev edit request. If you had typed
83
84 . edit list
85
86 on the other hand, abbrev would not invoke the abbrev edit request but
87 would instead pass the line "edit list" to the current command
88 processor for execution.
89
90
91 Two special abbrev requests do not actually have names but instead are
92 invoked directly by the abbrev escape character. Assuming that the
93 abbrev escape character is a period ., these requests are
94
95 .
96 displays the current version of abbrev.
97 .<SP>LINE
98 passes LINE directly to the current command processor without
99 expanding any embedded abbreviations. <SP> is the space character.
100
101
102 List of abbrev requests:
103 ? names
104 describes the function and usage of the given abbrev control
105 requests. If none are given, all abbrev requests are described.
106
107
108 a name LINE, af name LINE
109 adds LINE as the definition of a new abbreviation with the specified
110 name to the current profile. LINE is the remainder of the request
111 line after the whitespace which separates it from the abbreviation
112 name. This abbreviation will be expanded anywhere it appears in a
113 line. If an abbreviation with the given name already exists and the
114 "a" request is used, the user is queried for permission to replace
115 its definition; if the "af" request is used, the old definition is
116 replaced without a query.
117
118
119 ab name LINE, abf name LINE
120 adds LINE as the definition of a new abbreviation with the specified
121 name to the current profile. This abbreviation will only be
122 expanded if it appears at the beginning of a line or immediately
123 after a semi-colon ;, semi-colon vertical bar pair ;| or
124 left bracket ). If an abbreviation with the given name
125 already exists and the "ab" request is used the user is queried for
126 permission to replace its definition; if the "abf" request is used
127 the old definition is replaced without a query.
128 debug
129 invokes debug to allow debugging of a process in which it is no
130 longer possible to execute commands although it is still possible to
131 execute abbrev request lines.
132 delete names dl names d names
133 deletes the specified abbreviations from the current profile.
134
135
136 edit name
137 invokes the qedx editor to edit the specified abbreviation's
138 definition. See "Notes on editing abbreviations" below for more
139 detailed information.
140 escape STR esc STR
141 changes the escape character which is used to indicate that
142 a command line is actually an abbrev request line. STR must be
143 a single non-blank character. If no STR is given the escape
144 character presently in use is displayed. Default -- a period .
145 forget f
146 disables remember mode. See the remember and show requests below
147 for more information.
148
149
150 l names
151 displays the names switches and definitions of the specified
152 abbreviations in alphabetical order. If no names are given all
153 abbreviations within the profile are displayed.
154 la STRs
155 displays the names switches and definitions of any abbreviations
156 whose name starts with one of the given strings.
157 lab la^b STRs
158 displays the names switches and definitions of abbreviations which
159 are beginning-of-line abbreviations lab or not beginning-of-line
160 abbreviations la^b starting with STRs.
161
162
163 lb l^b names
164 displays the names switches and definitions of named
165 abbreviations lb for beginning-of-line l^b for not beginning
166 of line abbreviations. If no names are given list all of the
167 abbreviation-type.
168 ls STRs
169 displays the names switches and definitions of any abbreviations
170 which contain STRs in its name.
171 lsb ls^b STRs
172 displays the names switches and definitions of any
173 beginning-of-line abbreviations lsb or not beginning-of-line
174 abbreviations whose name contains STRs.
175
176
177 lx STRs
178 displays the names switches and definitions of abbreviations
179 whose definitions contain STRs.
180 lxb lx^b STRs
181 displays the names switches and definitions of beginning-of-line
182 abbreviations lxb or not beginning-of-line abbreviations lx^b
183 whose definitions contain STRs.
184
185
186 probe
187 invokes probe to allow debugging of a process in which it is no
188 longer possible to execute commands although abbrev request lines
189 can still be executed.
190 profile p
191 prints the pathname of the profile segment presently being used to
192 expand abbreviations.
193
194
195 quit q
196 disables abbreviation processing of subsequent command lines.
197 remember r
198 enables remember mode. In remember mode abbrev saves the expansion
199 of the last line that it has processed. This saved expansion can by
200 displayed using the show request described below. See also the
201 forget request above.
202 rename old_name1 new_name1 ...
203 rn old_name1 new_name1 ...
204 renames the specified abbreviations. If an abbreviation is already
205 defined with one of the new names abbrev will query for permission
206 to replace it with the old abbreviation. The ellipsis signifies
207 that multiple pairs of names may be given on the request line.
208
209
210 show LINE s LINE
211 if LINE is given displays the expansion of that line without
212 actually executing it. If LINE is not given displays the last line
213 expanded if remember mode is enabled. See the remember and forget
214 requests above.
215 switch_on switch_name names swn switch_name names
216 turns on the specified switch in the definitions of the given
217 abbreviations. See "List of abbreviation definition switches"
218 below for more information.
219 switch_off switch_name names swf switch_name names
220 turns off the specified switch in the definitions of the given
221 abbreviations.
222
223
224 terminate_process
225 causes a fatal process error. This request is intended for use when
226 the process is in a state where although command lines are still
227 being read by the listener the system will not execute anything
228 other than abbrev requests. Use of this request is an alternative
229 to disconnecting the terminal reconnecting to the system and using
230 the connect loop to obtain a new process.
231
232
233 use path u path
234 changes the pathname of the profile segment. The "profile" suffix
235 is assumed if not supplied. If the specified segment does not
236 exist the user is queried for permission to create it. If the
237 pathname is ommitted abbrev reverts to the default profile --
238 >udd>Project_id>Person_id>Person_id.profile. Any
239 non-beginning-of-line abbreviation definitions in the supplied
240 pathname are expanded in order to determine the actual profile
241 pathname.
242
243
244 List of abbreviation definition switches:
245 The following switches are defined as part of each abbreviation's
246 definition:
247 beginning_of_line bol
248 specifies that this abbreviation is only expanded in a command line
249 when it appears at the beginning of a line or immediately after a
250 semi-colon ; semi-colon vertical bar pair ;| or
251 left bracket ). Ie: only expand the abbreviation when it is used
252 as the name of a command. If this switch is off the abbreviation
253 will be expanded anywhere on a command line. This switch is
254 indicated by the letter "b" when displaying an abbreviation.
255
256
257 Notes on editing abbreviations:
258 When the abbrev edit request is invoked to edit an abbreviation it
259 first displays the definition of the abbreviation and then invokes the
260 standard qedx editor with the definition in buffer 0. Any use of the
261 qedx write w request without a "pathname" will cause the revised
262 definition to be saved in the profile segment.
263
264 If the qedx read r or write w request is used in any buffer with a
265 "pathname" the "pathname" is instead interpreted as the name of an
266 abbreviation. There is presently no mechanism to allow a buffer to be
267 read from or written to a segment.
268
269
270 When writing a buffer and an abbreviation of the given name does not
271 exist it is created with the beginning_of_line switch set off. See
272 "List of abbreviation definition switches" above for more information.
273
274 If the abbreviation already exists and is not the default for the
275 buffer as displayed by the qedx status x request abbrev will ask for
276 permission to overwrite the definition of the abbreviation. In this
277 case the abbreviation will retain its original setting of the
278 beginning_of_line switch.