In the tcsh manpage, the effects of
set complete = enhance are defined as follows:
[...] completion 1) ignores case and 2) considers periods, hyphens and underscores ('.', '-' and '_') to be word separators and hyphens and underscores to be equivalent.
As regards 1), I know that
readline can be configured to ignore case through
set completion-ignore-case on. So my question concerns only 2).
For instance, if I have a directory containing several files with similar basenames but different extensions like this:
$ ls file0.dat file1.dat file2.dat files.sh
then I want the shell to be able to complete on file extension:
$ cat .sh<TAB> $ cat files.sh
Is there a way to achieve or, at least, mimic this behavior in
Following first answers, here are other examples that show more accurately how the
tcsh feature works:
$ ls abc.foo abc.bar cab.foo cab.bar $ cat a.f<TAB> $ cat abc.foo
$ cat .b<TAB> abc.bar cab.bar $ cat .bar
tcsh completes both basename and extension. The behavior intended here is to list the possibilities if more than one, as usual with TAB completion, not to insert them all.