From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20821 invoked from network); 27 Sep 1999 17:08:35 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Sep 1999 17:08:35 -0000 Received: (qmail 427 invoked by alias); 27 Sep 1999 17:08:28 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8073 Received: (qmail 420 invoked from network); 27 Sep 1999 17:08:27 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer thoth.mch.sni.de) From: "Andrej Borsenkow" To: "ZSH workers mailing list" Subject: _man - fast searching for glob patterns Date: Mon, 27 Sep 1999 21:08:25 +0400 Message-ID: <000101bf090a$e9069970$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) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Importance: Normal Our system (descendant of Pyramid DC/OSx) has an unusual man system. The man directory is assumed to have mandb file with format man_page section path_to_file ... ("normal" man pages are supported as well - with caveat, that if the system finds mandb man page it never searches for normal one). Well, it is trivial to look for mandb file ... unfortunately, the number of manual pages is about 4000 - so, the simple while read manpage dummy if [[ $manpage == $our-search-pattern ]] ... done < $mandb-file needs a considerable amount of time (10-15 seconds here). Globbing is hard to use, because path_to_file may be *anything* - so, file names are not always valid manpage names. And directory structure under man dir may be of any depth as well - so, recursive globbing is needed and it takes some time as well. Any idea? TIA /andrej