I'm using tcsh in a SUSE 11 box and I realized that when typing makeTabit allows me to auto-complete the rules available within the Makefile, not the files that are inside the current directory.I've tested this with RedHat and Ubuntu at work and Debian at home (all with tcsh), and none of them supports this (IMO) nice behavior.How can this be achieved with the other distributions as well?This is something I've wanted to have since many years ago.
Autocompletion for Makefile rules in tcsh
shell;autocomplete;make;tcsh
You need to add calls to complete to your shell startup file (~/.tcshrc). Apparently your SuSE box has predefined rules for make; look for them in /etc/csh.cshrc or some other file provided alongside tcsh (rpm -ql tcsh).The tcsh distribution comes with some example completions (Debian puts them in /usr/share/doc/tcsh/examples/complete.tcsh.gz); here's the one for make:complete make \    'n/-f/f/' \    'c/*=/f/' \    'n@*@`cat -s GNUmakefile Makefile makefile |& sed -n -e /No such file/d -e /^[^     #].*:/s/:.*//p`@'