Re: CFR: Replace man/manpath/whatis/apropos with a shell script

From: Alexander Best <arundel_at_freebsd.org>
Date: Fri, 10 Sep 2010 02:48:20 +0000
On Thu Sep  9 10, Gordon Tetlow wrote:
> On Wed, Aug 18, 2010 at 12:11 AM, Gordon Tetlow <gordon_at_tetlows.org> wrote:
> 
> > All,
> >
> > I sat down and rewrote the man tools from a relatively old codebase to a
> > single shell script. My original motivation was to allow multiple
> > configuration files so port installations did not have to mess with
> > /etc/manpath.config (like perl for example) when needing to manipulate the
> > manpath. After looking at the existing code, I figured I could rewrite it as
> > a shell script relatively easily.
> >
> > Script (install as /usr/bin/man, /usr/bin/manpath, /usr/bin/apropos,
> > /usr/bin/whatis)
> > http://people.freebsd.org/~gordon/man.sh<http://people.freebsd.org/%7Egordon/man.sh>
> >
> > Features of the new code:
> >
> > 1. BSD licensed (old code is GPL).
> > 2. Imports configuration from /usr/local/etc/man.d/*.conf and /etc/man.conf
> > (purposefully changed the manpath.config file since it is a different
> > syntax).
> > 3. Allows ports to override the toolset used to display the manpage based
> > on language. This was done to try to merge the functionality of the
> > japanese/man port into the base system as much as possible.
> >
> > I've tried to make this mirror the functionality, directory search order,
> > and arguments as the current base implementation.
> >
> > This brings me to my next point. I need some testers willing to try this
> > out. It would be particularly great if I could get some foreign language
> > testers with localized manpage installations. If something doesn't work the
> > way you expect, please contact me and I can help debug it (using man -ddd
> > <whatever> will generally give me the debug information I need).
> >
> 
> I have a new set for testing:
> http://people.freebsd.org/~gordon/man.shar<http://people.freebsd.org/%7Egordon/man.shar>
> 
> This is going to be my final set before I commit it into the tree, barring
> any showstoppers. Now includes manpage documentation for the various parts
> of the new utilities. To install:
> # sh man.shar
> # make
> # make -DBINDIR=/usr/bin install
> 
> Feedback on the man(1), manpath(1), apropos(1), and man.conf(5) manpages
> would be appreciated. I'm new to manpage authoring and could use a review.

i also did some naive benchmarking using 'cat' as pager and your script is just
as fast as the current man binary. good work. :)

i was a bit surprised about how people complained about the new BSD grep being
slower than gnu grep. so the lesson we learnt is: never make things slower as
they are. ;)

cheers.
alex

> 
> Please let me know if you have any questions.
> 
> Thanks,
> Gordon

-- 
a13x
Received on Fri Sep 10 2010 - 00:48:20 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:07 UTC