Filename Completion

To use filename completion, type a prefix of a filename and hit the completion key. If the prefix is unique, the shell types the rest of the filename for you. Otherwise, it types as much as is common to all matches, and then beeps. In tcsh, the completion key is TAB and filename completion is always active. In csh, the completion key is ESC; in addition, you must set the filec variable in ˜/.cshrc to turn on filename completion.

To list completion matches for a prefix (e.g., when the prefix is ambiguous), type CTRL-D.

Words beginning with ˜ are completed as home directory references. In tcsh, words beginning with $ are completed as variable names and words beginning with =n are completed as though they began with the directory named by directory stack n.

Setting the fignore shell variable to a list of filename suffixes causes names ending in those suffixes to be ignored for completion.

Get Using csh & tcsh now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.