From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7592 invoked from network); 28 Sep 1999 09:12:12 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 28 Sep 1999 09:12:12 -0000 Received: (qmail 26701 invoked by alias); 28 Sep 1999 09:12:00 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8080 Received: (qmail 26692 invoked from network); 28 Sep 1999 09:11:59 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer thoth.mch.sni.de) From: "Andrej Borsenkow" To: "Bart Schaefer" , "ZSH workers mailing list" , "Zefram" Subject: RE: _man - fast searching for glob patterns Date: Tue, 28 Sep 1999 12:34:52 +0400 Message-ID: <000b01bf098c$5552bba0$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Importance: Normal In-Reply-To: <990927173307.ZM17473@candle.brasslantern.com> > firstmatchingpage=$allpages[(r)$our-search-pattern] Thank you. This is a bit faster rep[$#rep+1]=(${(M)allpages:#${~approx}$PREFIX${~star}$SUFFIX}) it gets all matching elements and assigns them to result. The speed is acceptable (I suppose, globbing would take the same time). BTW I wonder, if array[$#array+1]=(...) is much better than array=($array ...) ?? cheers /andrej