On Tue, Apr 01, 2025 at 08:46:52AM -0600, cygwin wrote:
> On 2025-04-01 02:37, Corinna Vinschen via Cygwin wrote:
> > On Mar 31 23:26, Brian Inglis via Cygwin wrote:
>
> > The only question is, assuming as a user I have have man-pages-linux
> > and man-pages-freebsd installed.  How do I decide on the command line
> > which of them I see?
>
>
>       $ export MANPATH=$MANPATH:/usr/share/man/man-pages-freebsd

With the advent of the `manpath` utility, this only works when MANPATH is empty.
But the next line always works:

| $ export MANPATH=:/usr/share/man/man-pages-freebsd

Now (contrary to what `man manpath` says :)

| $ manpath
| manpath: warning: $MANPATH set, prepending /etc/man_db.conf
| /usr/share/man:/usr/share/man/man-pages-freebsd

manpath prepended man_db.conf because ':' was at the front of MANPATH. If ':'
had been at the end, manpath would have appended man_db.conf. If you want
man_db.conf somewhere in the middle, put a pair of colons where you want it to
go.

>
>       $ alias apropos='apropos -m man,man-pages-freebsd'
>       $ alias man='man -m man,man-pages-freebsd'

No aliases needed if you set the MANPATH.

Cheers ... Duncan.

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to