From owner-freebsd-questions Sat May 13 7: 7:20 2000 Delivered-To: freebsd-questions@freebsd.org Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (Postfix) with ESMTP id 31E0D37B6B1 for ; Sat, 13 May 2000 07:07:09 -0700 (PDT) (envelope-from ben@scientia.demon.co.uk) Received: from strontium.scientia.demon.co.uk ([192.168.91.36] ident=exim) by scientia.demon.co.uk with esmtp (Exim 3.12 #1) id 12qb83-0002uk-00; Sat, 13 May 2000 13:34:47 +0100 Received: (from ben) by strontium.scientia.demon.co.uk (Exim 3.12 #7) id 12qb83-000MUN-00; Sat, 13 May 2000 13:34:47 +0100 Date: Sat, 13 May 2000 13:34:46 +0100 From: Ben Smithurst To: Darren Wyn Rees Cc: freebsd-questions@freebsd.org Subject: Re: accessing local man pages Message-ID: <20000513133446.J10128@strontium.scientia.demon.co.uk> References: <20000511220417.C10040@netlink.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20000511220417.C10040@netlink.co.uk> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Darren Wyn Rees wrote: > Using Linux, I can type 'man -l ' to pick up a local man page. > > (By "local", I mean man page is in pwd). > > How can I do that with FreeBSD man command ? > > I've tried ... man -M You could do it the hard way, groff -mdoc -mtty-char -Tascii manpage.1 | less or gzip -dc manpage.1.gz | groff -mdoc -mtty-char -Tascii | less Or you could stick those in a simple script, say "lman": #!/bin/sh for i; do case $i in *.gz) gzip -dc $i | groff -mdoc -mtty-char -Tascii | less ;; *) groff -mdoc -mtty-char -Tascii $i | less ;; esac done s/less/more/ if that's what you prefer. All completely untested, of course. :-) The downside is that you have to type "lman progname.1" or whatever instead of just "lman progname". As for -M, I think man expects to find man[1-9] directories inside each directory of MANPATH, so if you do 'man -M /foo bar' it will probably look for /foo/man1/bar.1, /foo/cat1/bar.1, etc, repeating for values of 1..9. Try 'man -d' to see exactly what's happening. -- Ben Smithurst / ben@scientia.demon.co.uk / PGP: 0x99392F7D To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message