CFR: Replace man/manpath/whatis/apropos with a shell script
Gordon Tetlow
gordon at tetlows.org
Sat Sep 11 07:26:05 UTC 2010
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
More information about the freebsd-current
mailing list