07/03/87 abbrev, ab Syntax as a command: ab {-control_args} Syntax as an active function: [ab] Function: controls the expansion of abbreviations within Multics command lines. As an active function, returns "true" if abbreviation expansion of command lines is currently enabled and "false" otherwise. Control arguments: are accepted only when invoked as a command and may be chosen from: -on enables abbreviation expansion within subsequent command lines until either the -off control argument or the abbrev quit request (see "List of abbrev requests" below) is used. (Default) -off disables abbreviation expansion in subsequent command lines. -profile path, -pf path changes the pathname of the profile segment. The "profile" suffix is assumed if not supplied. If the specified segment does not exist, the user is queried for permission to create it. (Default -- >udd>Project_id>Person_id>Person_id.profile) -escape STR, -esc STR changes the abbrev escape character which is used to indicate that a command line is actually a request line. STR must be a single, non-blank character. STR remains in effect until process termination, or the issuance of another -esc STR argument. See "Notes on abbrev request lines" below. (Default -- a period (.)) Notes: When enabled, abbrev examines each command line before it is executed by the command processor. If the line does not start with the abbrev escape character, abbrev expands any abbreviations embedded in the line and passes it to the command processor for execution. Notes on break sequences: When abbrev expands a command line, it treats certain character sequences as special break sequences. An abbreviation cannot contain break sequences. Any character string that is less than or equal to eight characters long and is bounded by break sequences is a candidate for expansion. Said string is looked up in the current profile segment and, if it is found, the expanded form is placed in (a copy of) the command line that is passed on to the normal command processor. For the purpose of expansion, the beginning and end of the line are considered as break sequences. The following single character break sequences are recognized by abbrev: space horizontal tab newline vertical tab formfeed " $ ' ` . ; | ( ) < > [ ] { } In addition, the archive component pathname delimiter is also recognized as a break sequence. This two character sequence is: :: Notes on abbrev request lines: Any line which begins with the abbrev escape character is treated as an abbrev request line. The default escape character is a period (.) but may be changed via the "-escape" control argument. The abbrev request name must appear immediately following the abbrev escape character without any intervening whitespace. In other words, if the abbrev escape character is a period (.), .edit list is the proper way to invoke the abbrev edit request. If you had typed . edit list on the other hand, abbrev would not invoke the abbrev edit request but would instead pass the line "edit list" to the current command processor for execution. Two special abbrev requests do not actually have names but instead are invoked directly by the abbrev escape character. Assuming that the abbrev escape character is a period (.), these requests are . displays the current version of abbrev. .LINE passes LINE directly to the current command processor without expanding any embedded abbreviations. is the space character. List of abbrev requests: ? names describes the function and usage of the given abbrev control request(s). If none are given, all abbrev requests are described. a name LINE, af name LINE adds LINE as the definition of a new abbreviation with the specified name to the current profile. LINE is the remainder of the request line after the whitespace which separates it from the abbreviation name. This abbreviation will be expanded anywhere it appears in a line. If an abbreviation with the given name already exists and the "a" request is used, the user is queried for permission to replace its definition; if the "af" request is used, the old definition is replaced without a query. ab name LINE, abf name LINE adds LINE as the definition of a new abbreviation with the specified name to the current profile. This abbreviation will only be expanded if it appears at the beginning of a line or immediately after a semi-colon (;), semi-colon vertical bar pair (;|) or left bracket ([). If an abbreviation with the given name already exists and the "ab" request is used, the user is queried for permission to replace its definition; if the "abf" request is used, the old definition is replaced without a query. debug invokes debug to allow debugging of a process in which it is no longer possible to execute commands although it is still possible to execute abbrev request lines. delete names, dl names, d names deletes the specified abbreviations from the current profile. edit name invokes the qedx editor to edit the specified abbreviation's definition. See "Notes on editing abbreviations" below for more detailed information. escape {STR}, esc {STR} changes the escape character which is used to indicate that a command line is actually an abbrev request line. STR must be a single, non-blank character. If no STR is given, the escape character presently in use is displayed. (Default -- a period (.)) forget, f disables remember mode. See the remember and show requests below for more information. l {names} displays the names, switches, and definitions of the specified abbreviations in alphabetical order. If no names are given, all abbreviations within the profile are displayed. la STRs displays the names, switches, and definitions of any abbreviations whose name starts with one of the given strings. lab, la^b STRs displays the names, switches, and definitions of abbreviations which are beginning-of-line abbreviations (lab) or not beginning-of-line abbreviations (la^b), starting with STRs. lb, l^b {names} displays the names, switches, and definitions of {named} abbreviations, lb for beginning-of-line, l^b for not beginning of line abbreviations. If no names are given, list all of the abbreviation-type. ls STRs displays the names, switches, and definitions of any abbreviations which contain STRs in its name. lsb, ls^b STRs displays the names, switches and definitions of any beginning-of-line abbreviations (lsb) or not beginning-of-line abbreviations whose name contains STRs. lx STRs displays the names, switches and definitions of abbreviations whose definitions contain STRs. lxb, lx^b STRs displays the names, switches and definitions of beginning-of-line abbreviations (lxb) or not beginning-of-line abbreviations (lx^b) whose definitions contain STRs. probe invokes probe to allow debugging of a process in which it is no longer possible to execute commands although abbrev request lines can still be executed. profile, p prints the pathname of the profile segment presently being used to expand abbreviations. quit, q disables abbreviation processing of subsequent command lines. remember, r enables remember mode. In remember mode, abbrev saves the expansion of the last line that it has processed. This saved expansion can by displayed using the show request described below. See also the forget request above. rename old_name1 new_name1 ..., rn old_name1 new_name1 ... renames the specified abbreviations. If an abbreviation is already defined with one of the new names, abbrev will query for permission to replace it with the old abbreviation. The ellipsis signifies that multiple pairs of names may be given on the request line. show {LINE}, s {LINE} if LINE is given, displays the expansion of that line without actually executing it. If LINE is not given, displays the last line expanded if remember mode is enabled. See the remember and forget requests above. switch_on switch_name names, swn switch_name names turns on the specified switch in the definitions of the given abbreviations. See "List of abbreviation definition switches" below for more information. switch_off switch_name names, swf switch_name names turns off the specified switch in the definitions of the given abbreviations. terminate_process causes a fatal process error. This request is intended for use when the process is in a state where, although command lines are still being read by the listener, the system will not execute anything other than abbrev requests. Use of this request is an alternative to disconnecting the terminal, reconnecting to the system, and using the connect loop to obtain a new process. use {path}, u {path} changes the pathname of the profile segment. The "profile" suffix is assumed if not supplied. If the specified segment does not exist, the user is queried for permission to create it. If the pathname is ommitted, abbrev reverts to the default profile -- >udd>Project_id>Person_id>Person_id.profile. Any non-beginning-of-line abbreviation definitions in the supplied pathname are expanded in order to determine the actual profile pathname. List of abbreviation definition switches: The following switches are defined as part of each abbreviation's definition: beginning_of_line, bol specifies that this abbreviation is only expanded in a command line when it appears at the beginning of a line or immediately after a semi-colon (;), semi-colon vertical bar pair (;|) or left bracket ([). (Ie: only expand the abbreviation when it is used as the name of a command). If this switch is off, the abbreviation will be expanded anywhere on a command line. This switch is indicated by the letter "b" when displaying an abbreviation. Notes on editing abbreviations: When the abbrev edit request is invoked to edit an abbreviation, it first displays the definition of the abbreviation and then invokes the standard qedx editor with the definition in buffer 0. Any use of the qedx write (w) request without a "pathname" will cause the revised definition to be saved in the profile segment. If the qedx read (r) or write (w) request is used in any buffer with a "pathname", the "pathname" is instead interpreted as the name of an abbreviation. There is presently no mechanism to allow a buffer to be read from or written to a segment. When writing a buffer and an abbreviation of the given name does not exist, it is created with the beginning_of_line switch set off. (See "List of abbreviation definition switches" above for more information.) If the abbreviation already exists and is not the default for the buffer as displayed by the qedx status (x) request, abbrev will ask for permission to overwrite the definition of the abbreviation. In this case, the abbreviation will retain its original setting of the beginning_of_line switch. ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved