Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: proposal: GDBM completion



leitner@xxxxxxxxxxxxxxxx (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@xxxxxxxxxxxxxxx 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



Messages sorted by: Reverse Date, Date, Thread, Author