BASH's new troff-macro-package-completion feature

[unspecified date]

Announcing version of BASH, the Free Software Foundation's "Bourne Again SHell".

The major improvement of version over is the addition of the troff macro-package completion feature, which is enabled by invoking BASH as follows:

bash --enable-troff-macro-package-completion
When this switch is enabled, troff macro-package completion can be requested by pressing the TAB key while the cursor is positioned at the end of a word following immediately after the sequence "-m", provided that the first word on the line is one of the list {troff,nroff,ditroff,psroff,qroff,groff,tbl,eqn,neqn}.

This causes BASH to look for all files in the directory /usr/lib/tmac whose names match the regular expression /^, where x is the sequence following "-m" on the command-line. If there is only one matching file, its name, minus the leading "tmac.m", is inserted. Otherwise all matching files are listed and command entry continues.

This facility is configurable in several ways. The following variables are special:

If this is set to the name of a directory, BASH looks in that directory for files matching the "-m" sequence.

If this is set to a regular expression, then troff macro-package completion is activated only when the first word on the line matches that regular expression, rather than when it is one of the commands listed above.

If this variable is set, then invoking troff macro-package completion always results in "-ms" being chosen, so that typing "troff -m<TAB>" is equivalent to typing "troff -ms".

If the file ".bash-troff-macro-package-directory-path" exists in the user's home directory, its contents are taken to be a list of directories in which macro-packages can be found, one per line. The file is re-read before executing each command, in case it has changed.

If the file ".bash-troff-macro-package-server-address" exists in the user's home directory, its contents are taken to be the email address of a troff macro-package email name server conforming to the BTMPENS protocol version 1.1. Email with the subject-line "SHOW LIST" is submitted to this server at start-up time. BASH then waits for the reply and parses it to derive an up-to-date list of troff macro-packages in use at the remote site. This list is subsequently used for troff macro-package completion.

If the file ".bash-troff-macro-package-dynamic-server" exists in the user's home directory, then mail is submitted to the specified server before each prompt is written, since the dynamic server may have changed its list of supported macro-packages.

Since AT&T are currently involved in a lawsuit against John Smith, merely because he shot two of the directors dead and maimed another for no adequately explored reason, the Free Software Foundation does not encourage the use of AT&T products.

Therefore, before including any macro-package name in a completion list, BASH scans the file looking for AT&T copyright messages, and omits the file from the completion-list if such a message is found. The special variable troff-macro-package-att-copyright-message-regexp can be set to alter BASH's idea of what constitutes an AT&T copyright message.

The source for BASH version is obtainable in compressed tar format as "bash-" from the usual FTP sites. Compressed diffs between the previous version,, and the new version are available as "bash-".

Since the new extension to BASH is written in GNU object-oriented lazy-evaluation functional virtual COBOL, the GNU object-oriented lazy-evaluation functional virtual COBOL compiler, GOOLEFVC is required to build it.

This will be made available in early June 1996.

Feedback to <> is welcome!