From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15673 invoked from network); 13 Apr 1999 15:04:25 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Apr 1999 15:04:25 -0000 Received: (qmail 25888 invoked by alias); 13 Apr 1999 15:04:14 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6022 Received: (qmail 25876 invoked from network); 13 Apr 1999 15:04:12 -0000 Message-Id: <9904131439.AA40214@ibmth.df.unipi.it> To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: matching in the new completion system In-Reply-To: "Sven Wischnowsky"'s message of "Tue, 13 Apr 1999 15:18:50 DFT." <199904131318.PAA04262@beta.informatik.hu-berlin.de> Date: Tue, 13 Apr 1999 16:39:55 +0200 From: Peter Stephenson Sven Wischnowsky wrote: > Peter Stephenson wrote: > > > It gets worse after that. If I now go back and do /u/s/, the whole > > shell hangs completely and has to be killed from somewhere else. (I just > > started off with /u/s/m, but it all looks similar.) > > Ick. I can't reproduce this, but... > > Are you sure it hangs? Or is it just incredibly slow? For me, the lack > of speed comes from the size of the directories `/usr/s*'. Also, there > was a problem with building a pattern that is used to remove unmatched > strings over which I stumbled when trying the same (`/u/s/'). The > problem was that I used `${(@M)tmp1:#(${(j:|:)~tmp2})}' where I should > have used `${(@M)tmp1:#(${(j:|:)~${(@)tmp2:q}})}' to make sure special > characters in the filenames are not taken as pattern characters. It's something to with the |'s. It's trying to build a *huge* pattern like that. By the looks of it, it includes every single thing in the command table. It begins */(XNSquery|XNSrouted|acct|adfutil|allocp|arp|audit|auditbin|auditcat| auditpr|auditselect|auditstream|automount|autopush|backbyinode|backbyname| backup|bffcreate|biod|bootexpand|bootinfo|bootpd|bootrec... These are the tail ends of the files in /u*/s*/*. The trace of _path_files finishes up with + tmp1=( ) + compadd -O tmp2 -F fignore - + [[ 423 -eq 0 ]] + [[ /usr/sbin/XNSquery == */* ]] and then it stops. The part it's doing corresponds to # Remove all files that weren't matched. if [[ "$tmp1[1]" = */* ]]; then tmp1=( "${(@M)tmp1:#*/(${(j:|:)~${(@)tmp2:q}})}" ) else tmp1=( "${(@M)tmp1:#(${(j:|:)~${(@)tmp2:q}})}" ) fi It does seem to be due to speed. In fact, it now takes 8 seconds just to build all the files in the Src directory, irrespective of path completion, which should be almost instantaneous. I smell a rat somewhere. -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy