From owner-freebsd-questions@FreeBSD.ORG Mon Nov 10 19:19:45 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EA71916A4CE for ; Mon, 10 Nov 2003 19:19:45 -0800 (PST) Received: from mta7.adelphia.net (mta7.adelphia.net [68.168.78.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1ED7C43FE1 for ; Mon, 10 Nov 2003 19:19:45 -0800 (PST) (envelope-from andi_payn@speedymail.org) Received: from [10.1.0.9] ([68.65.235.109]) by mta7.adelphia.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20031111031948.GJYB19413.mta7.adelphia.net@[10.1.0.9]> for ; Mon, 10 Nov 2003 22:19:48 -0500 From: andi payn To: freebsd-questions@freebsd.org Content-Type: text/plain Message-Id: <1068520779.3935.41.camel@verdammt.falcotronic.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Mon, 10 Nov 2003 19:19:43 -0800 Content-Transfer-Encoding: 7bit Subject: Reading non-installed man pages, etc. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2003 03:19:46 -0000 I'd occassionally like to be able to read manpages from somewhere other than the MANPATH. Let me give you two concrete examples of things that I can do on linux, that I don't know how to do on FreeBSD $ man /mnt/falco3/usr/share/man/man1/ls.1.bz2 $ man /home/andi/foo/doc/foo.1 In the first case, I'm looking at the manpages exported (over NFS) from a Mandrake linux box; in the second, I'm looking at the manpages for a program I'm trying to get installed. First, FreeBSD's man doesn't seem to accept a full pathname. In the first case, I can get around this with MANPATH or -M ("man -M/mnt/falco3/usr/share/man ls"), but in the second, that won't help. Second, FreeBSD's man doesn't handle bz2 compression. I suppose I could do something like this: $ bzcat /mnt/falco3/usr/share/man/man1/ls.1.bz2 | groff -man -Tascii -mtty-char | less And I could write scripts to wrap this up (figure out whether to use bzcat, zcat, or cat; whether we're talking to a tty-char-capable terminal or something else; which charset to use; what pager to use; etc.). Basically, it'd do everything man is doing except for finding the page in the MANPATH and dealing with catfiles, which sounds like a bit of a duplication of effort. So, if this is already done somewhere, or there's an way that I've missed to make man or some other tool do what I want, I'd rather not reinvent the wheel. Also, I seem to remember installing GNU's *roff stuff onto a Solaris box and having a program that let me do 90% of what I want to do. The groff(1) manpage has a reference to groffer that sounds like it might be what I'm remembering, but I can't find any more information about it (or the program itself). Another alternative would be porting the GNU man (with the bzip2 patches), but I'm not sure this is a good idea (I don't know if it would require other stuff to be ported, for example; also, the name "gman" is already taken for a Gtk+ xman-type program). Any ideas? Thanks.