Date: Sat, 13 May 2000 13:34:46 +0100 From: Ben Smithurst <ben@scientia.demon.co.uk> To: Darren Wyn Rees <merlin@netlink.co.uk> Cc: freebsd-questions@freebsd.org Subject: Re: accessing local man pages Message-ID: <20000513133446.J10128@strontium.scientia.demon.co.uk> In-Reply-To: <20000511220417.C10040@netlink.co.uk> References: <20000511220417.C10040@netlink.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
Darren Wyn Rees wrote: > Using Linux, I can type 'man -l <manpage>' 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 <path to local man page> <man page> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000513133446.J10128>