codeswitcher: A rainbow splash of paint exploding upward (Default)
codeswitcher ([personal profile] codeswitcher) wrote in [community profile] cs_hackerary2021-02-05 10:53 pm
Entry tags:

Feeling clever: tcsh completions for my custom inc

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


Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting