From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2563 invoked from network); 9 Jun 1999 09:19:24 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 Jun 1999 09:19:24 -0000 Received: (qmail 24484 invoked by alias); 9 Jun 1999 09:18:56 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6547 Received: (qmail 24477 invoked from network); 9 Jun 1999 09:18:50 -0000 From: "Andrej Borsenkow" To: "Sven Wischnowsky" , Subject: RE: PATCH: Re: Completion and global aliases Date: Wed, 9 Jun 1999 13:17:37 +0400 Message-ID: <003b01beb258$eaa6aad0$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-reply-to: <199906090853.KAA20996@beta.informatik.hu-berlin.de> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 > > And to avoid having them take up memory we could put (the equivalent > of) `unfunction compinit; autoload compinit' at their ends. > > (At least the memory thing was the only reason why I was against > turning them into functions and I hadn't thought of this before... I'm > a bit slow sometimes.) > Well, the function was initial idea ... and I admit, it was probably wrong as well. The problem with functions is, they need to be defined somehow ... that returns us to the same problem, how do I find where this function lives. My goal was actually to make new completion (or should I better use function based completion?) to be as easy to setup as compctl. FBC has great advantage over compctl - as it stands now, ZSH already comes with handfull of useful completions that are already even installed :-). The only problem is to tell it to use them. As it seems, the possibilities are: - predefine compinit as autoloaded function if --enable-fndir is specified - create a builtin that will source compinit - provide COMPINIT (or eqv) parameter (read-only) to hold the full pathname of compinit. That is probably the least evil. In any case, if compinit remains sourced script, I would suggest moving it away from $fpath (e.g. in ${datadir}/zsh). How many users have 'autoload $^fpath/*(:t)' as suggested by readme? It is probably not nice having something else as functions in $fpath. And related - placement of dump file. Again, now, when most completion functions are installed in system-wide location - what is the reason to try put dump file in the same dir as compinit? Why not simply dump it in $HOME by default? I mean, that check will probably fail in 99% of all installations. /andrej