From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29256 invoked from network); 16 Jun 1999 08:21:41 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 16 Jun 1999 08:21:41 -0000 Received: (qmail 27161 invoked by alias); 16 Jun 1999 08:21:28 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6656 Received: (qmail 27154 invoked from network); 16 Jun 1999 08:21:26 -0000 Message-Id: <9906160752.AA22913@ibmth.df.unipi.it> To: "'zsh-workers@sunsite.auc.dk'" Subject: Re: Completion for limits In-Reply-To: ""Bart Schaefer""'s message of "Tue, 15 Jun 1999 16:36:25 DFT." <990615163626.ZM23923@candle.brasslantern.com> Date: Wed, 16 Jun 1999 09:52:47 +0200 From: Peter Stephenson "Bart Schaefer" wrote: > Hrm. This must have been broken for a while ... even before the change > to handling of quotes within ${...}, that would have needed to be > > compgen -k "(${(@j: :)${(f)$(limit)}%% *})" > > Using `compgen -s ...' is going to re-evaluate $(limit) every time the > completion is performed. Is adding the @ a better choice? It doesn't help you with new completion. The same function is going to be called every time, so the $(limit) will always be expanded anew, but before compgen is called rather than in the bowels. The only way round that is to cache the value in a variable the first time and use that, which doesn't seem worth the effort and the space. -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy