ZG - Zap gather.




ZG executes the given list of commands in the same way that a U1 command does -- the commands are copied into a hidden buffer and executed once. If these commands try to write output to the terminal, FRED gathers the output instead and appends it after the current line in buffer (bufname). For example,

zg(name) f

executes the F command and puts the output (the name of the current buffer and its associated file name) into buffer (name).

ZG is particularly useful when used in connection with the various F commands. It can use a buffer to collect the information produced by F so that the information may be processed in some manner.

If you use ZG to gather output, the output will be "raw", in the sense that it will not have gone through the normal output processing routines. For example, tabs in the gathered output will be real tab characters, despite the fact that FRED normally expands tabs to an appropriate number of spaces. Similarly, escape characters like \B, \C, and so on will be stored as their ASCII octal equivalents; normal terminal processing would translate these characters into a backslash followed by a capital letter for easy readability.

Output from a JE command always goes to the terminal, even if the JE is executed by ZG.

Copyright © 1998, Thinkage Ltd.