next up previous 65
Next: Editing the Input Line
Up: Input-line Editing
Previous: Suggested Value Recall


Filename completion

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):

Give NDF name > <x><TAB>
No match.[beep]
Give NDF name > <f><TAB>
Multiple matches.[beep]
Give NDF name > file.<CNTL/D>
file.dat    file.sdf
Give NDF name > file.<s><TAB>
Give NDF name > file <Return>
Give auxiliary data file name > <file.d><TAB>
Give auxiliary data file name > file.dat <Return>
(The last four lines would appear as two lines on the terminal, the second and fourth overwriting the first and third respectively.)



next up previous 65
Next: Editing the Input Line
Up: Input-line Editing
Previous: Suggested Value Recall

ADAM
Starlink User Note 144
A J Chipperfield
17 August 2001
E-mail:ussc@star.rl.ac.uk

Copyright © 2000 Council for the Central Laboratory of the Research Councils