Viewing man pages by path on OpenBSD
When writing man pages, I often find myself wanting to preview my man page as I write it. On systems with man-db, which means most Debian-derived distributions, Fedora, Arch, SuSE, etc., I usually do this by suspending my editor and running
man /path/to/foo.1
However, OpenBSD doesn’t use man-db and the above will abort with
man: no entry for /path/to/foo.1 in the manual.
Hence the following magic invocation:
mandoc /path/to/foo.1 | ${PAGER}
Since I prefer less
to most other pagers, I typically run:
mandoc /path/to/foo.1 | less
Comments: To comment on this post, send me an email following the template below. Your email address will not be posted, unless you choose to include it in the link: field. If your web browser is configured to handle mailto: links, click comment to load the template into your mail client.
To: Ryan Kavanagh <rak@rak.ac> Subject: [blog-comment] /blog/2013-02-19-viewing-man-pages-by-path-on-openbsd/ post_id: /blog/2013-02-19-viewing-man-pages-by-path-on-openbsd/ author: [How should you be identified? Usually your name or "Anonymous"] link: [optional link to your website] Your comments here. Markdown syntax accepted.
0 Comments