%EDit%



next up previous contents
Next: %Log% Up: Parser internal commands Previous: %Echo%

%EDit%

By default, the parser does not support line editing because line editing involves single character IO, which may be slow when used across a network, and because line editing may not work on all terminals. Therefore, you should try out line editing interactively, and, if you like it, activate it by defining the logical name/environment variable GTBUF_EDIT as specified below.

Line editing can be activated by typing %ed% on at any prompt. Once activated, you can use the cursor keys and some control keys allow you to `edit' your current command line. Since the parser saves the 20 most recently entered commands, a previously entered command can be recalled, edited, and then re-issued.

The %ed% command also allows you to set the control keys associated with the various editing functions. This is done by entering a string of two-character commands. The first character should be selected from (U, D, L, R, B, E, W, X, Z) to denote (Up, Down, Left, Right, Begin, End, reWrite, erase, eof), and the second character tells the parser what control character to associate with that command. The the string `UP' would cause ^P to be associated with the Up command. The following table lists the default control keys, function name, and action:

The default settings are:

%ED%OFF UB DN LD RF BH EE WR XU ZZ

which use the same control keys as VMS when editing is turned on.

If you like line editing and wish to activate it automatically, then you should define the logical name/environment variable to contain the string that you normally would enter following the %ed% command. For example:

For both the VMS and DOS examples, line editing is activated with the default control key assignments. For the UNIX example, editing is activated but with emacs-style control keys. Note, for the UNIX example, ^R would still rewrite the line.

The command %ed%? can be used to display your current edit settings and the command %ed%ver will display the EDICOM version number.

VMS users should note that editing is implemented using the SYS$QIO function using terminal read and write operations. This means that it is impossible to use line editing to input data from a file. This situation can cause problems in batch jobs or when reading a VMS command file. Of course, all standard operations, such as reading a script, will work. To avoid problems in batch, you should make sure that GTBUF_EDIT is only defined for interactive jobs.

UNIX users should note that if a program crashes when line editing is active, your terminal may be left in a no-echo state. You should use the UNIX reset command to reset the terminal characteristics.



next up previous contents
Next: %Log% Up: Parser internal commands Previous: %Echo%



Keith Arnaud (kaa@genji.gsfc.nasa.gov)
Mon Sep 18 14:36:38 EDT 1995