next up previous contents index
Next: Command Line Suspension Up: Command Syntax Previous: Command Recalling

Command Line Editing

 

The commands in the internal command buffer may also be edited.

On Unix systems MIDAS comes (since the 94NOV release) with two different line-editors: TermWindows (the one developed at ESO) and readline (which is from the GNU project). The default line-editor is readline which provides a history stack of commands, emacs or vi editing functions, command and filename completion functions, and a communication channel to the MIDAS GUI  Xhelp for the On-Line Help   utility. See the man page of readline for a complete list of options.
To use the old TermWindows line-editor just set the environment variable TERMWIN to yes. Please, note, that the TermWindows editor will be phased out in a future MIDAS release.

On VMS systems MIDAS comes only with the TermWindows line-editor.

To edit a MIDAS command, type the command number preceded by a dot (period) or followed by a dot. So `.xyz' or `xyz.' will both display the command `xyz' and put you into the edit mode where you can modify that command.
If you employ the pattern matching style, use `.:pattern' or `:.pattern' to edit a previous command containing that pattern.
You edit that line using the arrow keys and delete key of the keyboard and retyping the characters. On VMS systems to toggle between Replace and Insert mode use CtrlA.
Using `.xyz' ( `.:pattern') will lead to the creation of a new MIDAS command with new command number, whereas `xyz.' ( `:.pattern') modifies the specified command directly (and keeps this command number).
Also the commands recalled via the arrow keys can be edited.
As mentioned above only the 15 most recently used commands are kept in the command buffer on a first--in, first--out basis. So if you repeat or edit a certain command via its MIDAS command--number at least once in 15 command inputs, this command will always be kept in the buffer.
However, you may wish to make sure that a command remains always in the buffer. Entering `xyz/LOCK' will lock the command with number `xyz' in the buffer; to unlock the command, use `xyz/UNLOCK'.
The command CLEAR/BUFFER empties the command buffer and resets the command counter to 1. Since 3 digits are used for the command count, the counter is also reset to 1 after MIDAS command no. 999.



next up previous contents index
Next: Command Line Suspension Up: Command Syntax Previous: Command Recalling



Rein Warmels
Mon Jan 22 12:06:29 MET 1996