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

From: Gordon Tetlow <gordon_at_tetlows.org>
Date: Sat, 11 Sep 2010 00:26:04 -0700
On Thu, Sep 9, 2010 at 12:48 PM, Anonymous <swell.k_at_gmail.com> wrote:

> The order is still bogus compared to gnu man. If I don't like our
> ancient GNU tools and altered PATH in order to prefer ones from ports
> then I certainly don't want to view old manpages, too. The base manpath
> should be appended *after* any PATH substitutions.
>
>  $ man -aw gperf # man.sh
>  /usr/share/man/en.UTF-8/man1/gperf.1.gz
>  /usr/share/man/man1/gperf.1.gz
>  LOCALBASE/man/man1/gperf.1.gz
>
>  $ man -aw gperf # gnu man
>  LOCALBASE/man/man1/gperf.1.gz
>  /usr/share/man/en.UTF-8/man1/gperf.1.gz
>
>  > $ echo $PATH
>  >
> LOCALBASE/libexec/ccache:HOME/.bin:LOCALBASE/sbin:LOCALBASE/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:HOME/blah/bin
>

Fixed this up to no longer add an unconditional system search path. While
I'm not planning on supporting MANPATH_MAP, I have added special casing for
/bin and /usr/bin as encountered in PATH.


> And it doesn't show anything when there are no arguments, not even
> returning with exit code > 0.
>
>  $ man # man.sh
>
>  $ man # gnu man
>  What manual page do you want?
>  zsh: exit 1     man
>

Added.

Updated drop location at:
http://people.freebsd.org/~gordon/man.shar

Thanks for the feedback,
Gordon
Received on Sat Sep 11 2010 - 05:26:05 UTC

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