home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.questions:10924 comp.windows.x.apps:986
- Newsgroups: comp.unix.questions,comp.windows.x.apps
- Path: sparky!uunet!mcsun!sun4nl!fwi.uva.nl!casper
- From: casper@fwi.uva.nl (Casper H.S. Dik)
- Subject: Re: backward MANPATH ?
- Message-ID: <1992Sep10.141452.13036@fwi.uva.nl>
- Sender: news@fwi.uva.nl
- Nntp-Posting-Host: adam.fwi.uva.nl
- Organization: FWI, University of Amsterdam
- References: <1992Sep9.191751.22333@eng.ufl.edu>
- Date: Thu, 10 Sep 1992 14:14:52 GMT
- Lines: 44
-
- ruck@zeta.ee.ufl.edu (John R Ruckstuhl Jr) writes:
-
- >Sanity check, please --
- >Regarding "man" (SunOS 4.1.1) and "xman" utilities,
-
- >These utilities output the manpage found !last! in the MANPATH,
- >so one might suggest the MANPATH be constructed backwards (relative to
- >the construction of other "paths" like PATH, LDPATH, etc.).
-
- >E.g.,
- >If PATH is like /usr/bin:/usr/local/bin ,
- >then MANPATH is like /usr/local/man:/usr/man .
-
- Strange. On my version of SunOS 4.1.1, man(1) searches the MANPATH
- in the order specified in MANPATH.
- Man has some serious brain damage, though. The search algorithm is something
- like:
-
- for chapter in 1 n l 6 8 2 3 4 5 7 p o
- for suffix in getsuffixlist(chapter) !!!!!
- for dir in $MANPATH
- if ( -r $dir/man$chapter/$program.$chapter$suffix)
- found
- if ( -r $dir/cat$chapter/$program.$chapter$suffix)
- found
-
-
- The MANPATH should be in the outer loop, of course.
-
- With MANPATH = /usr/man:/usr/local/man, man now prefers
- /usr/local/man/cut.1 over /usr/man/man1/cut.1v
- The suffixlist for chapter one expands to ``<nothing> b c g m p r s v w''
- and man tries:
- /usr/man/man1/cut.1
- /usr/man/cat1/cut.1
- /usr/local/man/man1/cut.1 <- found !
-
- And you wanted it to find /usr/man/man1/cut.1v!!
-
- Casper
-
- --
- | Casper H.S. Dik
- | casper@fwi.uva.nl
-