When you reply to prompts from either an ADAM program or ICL, previous input can be recalled and edited – automatic filename completion is also possible in much the same way as it would be on the shell command line. At prompts for ADAM program parameters, you can also paste the suggested value into the input buffer and edit it. The maximum length of an input line is 256 characters – the terminal will beep if you attempt to input more.
Line recall and editing for ADAM uses virtually the same keys as tcsh
with the emacs
key
bindings.
This is achieved using the up and down arrow keys – the recalled line can then be edited in the normal way. Up to a maximum of 100 input lines will be remembered but in the case of programs run from the shell, only responses to prompts in the current invocation of the program can be recalled.
If there are no characters on the input line, the TAB
key (or ESC
,ESC
) will cause the suggested value (if
any) to be inserted as the input line. It can then be edited in the normal way. (There will be no
suggested value at the ICL>
prompt.)
See Filename Completion (Section 4.3) for the effect of these characters if there is already some input on the line.
If there are currently characters on the input line, the TAB
key (or ESC
,ESC
) will cause filename
completion to be attempted on the word preceding the cursor. If no match is found, “No match.”
will be printed and the terminal will beep; if more than one match is found, “Multiple
matches.” will be printed and the terminal will beep – the input line will be set to the longest
common prefix. A list of all possible matches can be displayed by typing ESC
,CNTL/D
. (At the
end of line, just CNTL/D
is sufficient – elsewhere CNTL/D
will delete the character at the
cursor.)
To overcome the problem of Starlink NDF and HDS filenames usually being required without
the .sdf
extension, .sdf
will be omitted from the end of any completed filename. This
behaviour may be altered by setting environment variable ADAM_EXTN to a comma-separated
list of extensions (in fact any strings) which are to be omitted from the end of completed
filenames. If no truncation of filenames is required, ADAM_EXTN should be set to a null
string.
When a single match is found, the filename is truncated if required and copied to the input line followed by a single space.
For example, suppose the default for filename truncation (.sdf
) is in use and the current directory
contains two files file.dat
and file.sdf
. The dialogue might go as follows (<> indicates typing by
the user):
(The last four lines would appear as two lines on the terminal, the second and fourth overwriting the first and third respectively.)
The left and right arrows and the delete key may be used as expected to edit the current input line. Input is always in ‘insert’ rather than ‘overwrite’ mode.
Key sequences for more complex line editing are given in Appendix F.
CNTL/Z
fg
command.
CNTL/C