Yes. Take a look at the
complete built-in. If I understand well, you have a command (script) called
Help somewhere in your PATH and you want to apply TAB completion to the first argument. The first argument will be the name of a .help file inside the $HOME/help directory, right? Here we go:
Code:
complete Help "p/1/(list)/"
this tells the shell to apply TAB completion to the first argument of the command Help and use the words in list. At this point you have to build the list of words by means of a command that lists all the .help files in the desired location. Example:
Code:
complete Help "p/1/(`cd $HOME/help && echo *.help`)/"
Suppose you want to remove the .help suffix, you can enhance the command at your pleasure, for example:
Code:
complete Help "p/1/(`cd $HOME/help && echo *.help | sed s/.help//g`)/"
Now put this line in a file that is sourced at login (e.g. $HOME/.tcshrc) and the trick is done. Hopefully!