Hamilton LaboratoriesHamilton C shell 2012User guideLanguage reference

Filename completion

Oregon Coast

Filename completion
Previous | Next

Topics

Usage
See also

Usage

Filename completion lets you type just the first part of a filename and have the shell fill in the rest. There are three variations: using the Tab key for walking one-by-one through the list of matches, Ctrl-F for basic filename completion and Ctrl-D to paste all the matches onto the command line.

Tab

Next match. Move one-by-one through the list of matching filenames. After the last, paste the original back in place, highlighting with the MATCHFAIL color, then continue, with the next Tab, cycling through the list again.

To type an ordinary tab character, use Ctrl-Tab. Alternately, if the C shell is started with the -T option, the Tab key generates a plain tab character and Ctrl-Tab is the filename completion key.

Shift-Tab

Previous match. Same as the Tab key, but rotate backward through the list of matches.

Ctrl-F

Filename completion. Appending the * wildcard character onto the end, use the previous word as a wildcard pattern. If it matches a single file, substitute it in with a space following. If you don't want a space following, use the -N option when you start the C shell.

If there were multiple matches, but they all had some common front-part that fully “used up” the pattern, substitute in just that common front-part and show it in the color specified by the DUPLICATES variable (default is green).

If substitution wasn't possible, highlight the pattern in the color specified by the MATCHFAIL variable (default is bright red). Any highlighting color is turned off when you press the next keystroke.

Ctrl-D

Duplicate completions. Same wildcarding, but if there are multiple matches, show them all with a space following. If you don't want a space following, use the
-N option when you start the C shell. If there were no matches, highlight the pattern in the color specified by the MATCHFAIL variable; default is bright red.

See also

Wildcarding
Command line editing
nonohidden variable
Hamilton C shell command line options
Tutorial: Wildcarding
Tutorial: Filename completion
Tutorial: Command line editing

Previous | Next

Getting started with Hamilton C shell

Hamilton C shell, as it first wakes up.

Getting started with Hamilton C shell

A first few commands.

You can set the screen colors to your taste.

You can set the screen colors to your taste.