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.
|
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access