gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] tla completion for tcsh


From: Dustin Sallings
Subject: Re: [Gnu-arch-users] tla completion for tcsh
Date: Thu, 20 May 2004 00:11:16 -0700


On May 15, 2004, at 16:54, Robert Widhopf-Fenk wrote:

I did not see anyone playing with completion for tcsh.

If anybody is curious looking at it or using it:

tla register-archive http://www.robf.de/Hacking/arch
tla get -A address@hidden tla-tcsh-completion--main

I've got these, they're good enough for me, and I don't have to change them when stuff gets added/removed.

set tlapath=`which tla`
if ( $? == 0 ) then
if ( -f $completecache && { test $tlapath -ot $completecache } ) then
                :
        else
                set updatecache=1
                set tlacommands=( \
`tla help | grep -v alias | sed -n 's,:.*,,p' | sort -u ` )
        endif
        complete tla 'p/1/$tlacommands/'
endif

set abapath=`which aba`
if ( $? == 0 ) then
if ( -f $completecache && { test $abapath -ot $completecache } ) then
                :
        else
                set updatecache=1
                set abacommands=( \
`aba help | grep -v alias | sed -n 's,:.*,,p' | sort -u ` )
        endif
        complete aba 'p/1/$abacommands/'
endif


        A lot of that is caching for optimization:

if ($updatecache == 1) then
        echo "Updating the completion cache."
        rm -f $completecache
        touch $completecache
        echo "set tlacommands=($tlacommands)" >> $completecache
        echo "set abacommands=($abacommands)" >> $completecache
endif

        That gets updated whenever things change...something like that.

--
SPY                      My girlfriend asked me which one I like better.
pub  1024/3CAE01D5 1994/11/03 Dustin Sallings <address@hidden>
|    Key fingerprint =  87 02 57 08 02 D0 DA D6  C8 0F 3E 65 51 98 D8 BE
L_______________________ I hope the answer won't upset her. ____________





reply via email to

[Prev in Thread] Current Thread [Next in Thread]