When Programmed Completions Do Not Apply
There are various circumstances under which programmed completions do not apply and for which tcsh reverts to its regular built-in completion behavior:
A regular completion is done when you try to complete a word of a command for which a programmed completion has been defined and none of the completion rules apply. This rule makes better sense if you consider, for example, a case in which you are trying to complete word 2 and have supplied a rule only for word 1. However, you may find regular completions being done unexpectedly. The usual symptom of such occurrences is that a word unexpectedly completes as a filename, that was to be excluded. When such instances happen, check your completion rules, because they probably aren't set up correctly.
Words beginning with
$or˜are completed to$variableor˜namereferences, and any programmed completions are ignored. However, if$variableor˜nameis followed by a slash, tcsh knows the whole variable or username has been supplied and can tell which directory you're referring to. At that point, programmed completions apply again.You can override programmed completions and do a regular completion or match listing by typing
CTRL-X TABorCTRL-X CTRL-D, rather thanTABorCTRL-D.
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