From owner-freebsd-stable@FreeBSD.ORG Sat Jul 19 16:48:39 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C06437B401; Sat, 19 Jul 2003 16:48:39 -0700 (PDT) Received: from pop016.verizon.net (pop016pub.verizon.net [206.46.170.173]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6120743F85; Sat, 19 Jul 2003 16:48:38 -0700 (PDT) (envelope-from cswiger@mac.com) Received: from mac.com ([141.149.47.46]) by pop016.verizon.net (InterMail vM.5.01.05.33 201-253-122-126-133-20030313) with ESMTP id <20030719234837.FUSA3199.pop016.verizon.net@mac.com>; Sat, 19 Jul 2003 18:48:37 -0500 Message-ID: <3F19D8D3.1040401@mac.com> Date: Sat, 19 Jul 2003 19:48:35 -0400 From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ruslan Ermilov References: <3F19C78A.7030008@mac.com> <20030719233535.GF77396@sunbay.com> In-Reply-To: <20030719233535.GF77396@sunbay.com> X-Enigmail-Version: 0.76.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at pop016.verizon.net from [141.149.47.46] at Sat, 19 Jul 2003 18:48:37 -0500 cc: stable@freebsd.org cc: jwe@che.utexas.edu Subject: Re: A patch to man to handle "man.1"... X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jul 2003 23:48:39 -0000 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