![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
I finally got a round tuit, which I poached from actually important things, and finally figured out how to set up autocompletion in tcsh for my custom inc, inca, with the spools list.
Dear self, the config file is ".tcshrc.nmh" which we apparently call from somewhere useful.
The magic lines are:
set nmh_mail_spools =
awk '{print $1}' $HOME/.vnmhx.spools | tr "\n" " "
complete inca 'C/*/$nmh_mail_spools/'
Note this is unnecessarily baroque, and we could have just used the spools directory instead.
Credit to:
man complete: https://www.ibm.com/support/knowledgecenter/SSLTBW_2.4.0/com.ibm.zos.v2r4.bpxa500/tcshcomplete.htm
Examples: https://hea-www.harvard.edu/~fine/Tech/tcsh.html
man sed: https://www.gnu.org/software/sed/manual/sed.html#sed-script-overview
how not to use sed at all: https://www.unix.com/shell-programming-and-scripting/162226-convert-rows-space-delimited-line.html