Programmed Completion
tcsh allows programmed completions to be specified using the complete command, as shown below:
completecommand word
/pattern
/list
/suffix
command
is the command to which the completion applies. The argument following the command is a completion rule that specifies how to complete a word or words from the command. Although the delimiter between parts of a completion rule is often a dash, it can be any character.
There may be more than one completion rule. Each rule has the parts listed below.
Part | Description |
---|---|
| Specifies how to select words from the command. It must be |
| Deter mines to which words the rule applies. |
| The word list from which to choose completions. The available lists are described below. |
| An optional suffix to be added to completed words. If missing, a slash is added to completed directory names and a space otherwise. If present, should be a single character. If the character is the same as the delimiter between parts of the completion rule, no suffix is added to completed words. |
The word
specifier determines how pattern
is interpreted. If word
is p, pattern
indicates the word position or positions to which the rule applies. Otherwise, pattern
is a filename pattern and the rule applies to any word whose leftmost part is matched by the pattern.
| Description |
---|---|
| Position-based 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.