From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.mira.net.au (8.6.12/8.6.9) with SMTP id XAA04481 for ; Tue, 27 Jun 1995 23:30:32 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA12243 (5.65c/Gatech-10.0-IDA for ); Tue, 27 Jun 1995 09:23:13 -0400 Received: by math (5.x/SMI-SVR4) id AA18772; Tue, 27 Jun 1995 09:20:09 -0400 Resent-Date: Tue, 27 Jun 1995 15:10:13 +0100 (MET DST) Old-Return-Path: From: hzoli@cs.elte.hu (Zoltan Hidvegi) Message-Id: <9506271310.AA02370@turan.elte.hu> Subject: Re: proposal: GDBM completion To: leitner@inf.fu-berlin.de (Felix von Leitner) Date: Tue, 27 Jun 1995 15:10:13 +0100 (MET DST) Cc: zsh-workers@math.gatech.edu (zsh-workers) In-Reply-To: from "Felix von Leitner" at Jun 26, 95 01:23:16 pm X-Mailer: ELM [version 2.4 PL21] Content-Type: text Resent-Message-Id: <"Y7y5V2.0.Eb4.9M0yl"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/117 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu leitner@inf.fu-berlin.de (Felix von Leitner) wrote: > > Hi folks ! > > I wonder whether we could implement some data base completion. What I > want to have is man page completion, but reading all the man pages from > an NFS server is very slow, and we have so many man pages installed that > I don't want zsh to keep the list in memory. One solution is to write an external program, and use it to generate the possible completions (e.g. with compctl -K). I think this would be fast enough. A built-in gdbm code would increase zsh size too much if there is no shared libraries for gdbm. > > The newer Berkeley db library has a B-tree database type, which can be > searched the way we need to implement completion. Wouldn't it be > possible to implement some database lookup completion ? I'd like to > write a new man(1) which uses the database to find the man pages, and > I'd like to have zsh complete my man pages ;) G.Wilford@ee.surrey.ac.uk has already written a very good man program, which use databases. It can use gdbm/Berkley db/ndbm, whatever you want. It updates the databases on the fly (no need to periodically run an update). It can be installed setuid man when it creates only man-writable databases and cat pages. It can compres cat pages, and can handle compressed nroff sources. It can handle stray cats (cap pages without nroff source). It can even extract whatis information from complessed (or uncompressed) stray cats. Try it, and if you miss a feature, implement it, and send it to Wilf. This program uses GNU autoconf so it should compile on most systems out of the box. It comes with English and German manual pages and it uses locale etc. The latest public release can be found on ftp://sunsite.unc.edu/pub/Linux/system/Manual-pagers/man_db-2.3.5.tgz or on any sunsite Linux mirror site. The Linux directory does not mean that it is Linux specific. There are also development releases avaible (as I remember, the latest is 2.3.9). If you would like to join the development, contact Wilf. Cheers, Zoltan