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