Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Jul 2003 19:48:35 -0400
From:      Chuck Swiger <cswiger@mac.com>
To:        Ruslan Ermilov <ru@freebsd.org>
Cc:        jwe@che.utexas.edu
Subject:   Re: A patch to man to handle "man.1"...
Message-ID:  <3F19D8D3.1040401@mac.com>
In-Reply-To: <20030719233535.GF77396@sunbay.com>
References:  <3F19C78A.7030008@mac.com> <20030719233535.GF77396@sunbay.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Ruslan Ermilov wrote:
> On Sat, Jul 19, 2003 at 06:34:50PM -0400, Chuck Swiger wrote:
>>I've always thought that specifying sections via "man -s 1 man" or "man 1 
>>man" was ugly, and didn't work very well with filename completion.  Diff 
>>relative to /usr/src/gnu/usr.bin/man to also handle the syntax of "man 
>>man.1":
>
> That would break man(1); currently, the "man ld-elf.so.1" displays
> the manpage, and your patch precludes the use of ".[0-9]" in the
> tails of manpage names.

Thanks for this example.  However, if you try the patch, you'll discover that 
this case also works properly:

106-sec# man -d ld-elf.so.1

using less as pager

using i386 architecture
found mandatory man directory /usr/share/man
found mandatory man directory /usr/share/perl/man
found mandatory man directory /usr/share/openssl/man
found optional man directory /usr/local/lib/perl5/5.8.0/man
found optional man directory /usr/local/lib/perl5/5.8.0/man
found optional man directory /usr/local/lib/perl5/5.00503/man
found manpath map /bin --> /usr/share/man
found manpath map /usr/bin --> /usr/share/man
found manpath map /usr/local/bin --> /usr/local/man
found manpath map /usr/X11R6/bin --> /usr/X11R6/man

search path for pages determined by manpath is
/usr/local/man:/usr/share/man:/usr/man

adding /usr/local/man to manpathlist
adding /usr/share/man to manpathlist
adding /usr/man to manpathlist

section (via suffix): 1

searching in /usr/local/man
trying section 1 with globbing
globbing /usr/local/man/man1/ld-elf.so.1*
globbing /usr/local/man/man1/ld-elf.so.0*
globbing /usr/local/man/cat1/ld-elf.so.1*
globbing /usr/local/man/cat1/ld-elf.so.0*

searching in /usr/share/man
trying section 1 with globbing
globbing /usr/share/man/man1/ld-elf.so.1*
to_name in convert_name () is: /usr/share/man/cat1/ld-elf.so.1.1.gz
will try to write /usr/share/man/cat1/ld-elf.so.1.1.gz if needed
status from is_newer() = 0

trying command: /usr/bin/zcat /usr/share/man/cat1/ld-elf.so.1.1.gz | less

	--

It works as does "man 1 ld-elf.so.1" and even "man 1 ld-elf.so"...

-- 
-Chuck




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F19D8D3.1040401>