Filename Completion

tcsh
Whilst typing a command, once a filename has been given enough unique characters to identify it, press the <Tab> key for the shell to complete it. For example, if there is only one directory beginning with the letters pub, then the command cd pub<Tab>, would be expanded to say, cd public_html/
C shell
In the C shell, filenames can be completed by pressing the <Esc> key or <Ctrl/[>. Note, for this to work the shell variable filec must be defined (see shell variables). To do this, type the command set filec, or add this command to the .cshrc file (see .cshrc files) to set as the default.

Both the C shell and tcsh will list available choices of filenames, whilst in the middle of typing a command, by using the escape sequence <Ctrl/d>. After listing the available choices the command will await completion. For example,

% lpr p<Ctrl/d>
package1.doc prog1.c prog2.c public_html
% lpr p

The command can then be completed by typing the rest of the desired filename, or enough letters to uniquely refer to a file and then use the shell's filename completion facilities. Note, see the comment above about filec, for this to work in the C shell.