The x-man-page:
scheme has been supported by Terminal.app
since at least
Mac OS X 10.3 Panther, though there doesn't appear to be any official
documentation for the scheme. There are two versions of x-man-page:
URLs:
man page lookup and apropos keyword search. ManOpen supports the
x-man-page:
scheme. The ManOpenURLHandlerCommand
class implements the
x-man-page:
support.
The man page lookup URL has the format:
x-man-page://<section>/<name>
where <section>
is the optional manual section number and <name>
is the
man page name to look up. Examples of man page lookup, using the open
command in a terminal window:
open "x-man-page://1/printf"
open "x-man-page:///grep"
The Terminal.app
allows a variable number of slashes before the <name>
portion of the URL, but requires exactly two slashes before the <section>
.
All these variations are accepted:
# with section and name
open "x-man-page://1/printf"
open "x-man-page://1//printf"
open "x-man-page://1///printf"
# with name only
open "x-man-page:/grep"
open "x-man-page://grep"
open "x-man-page:///grep"
open "x-man-page:////grep"
The apropos keyword search URL has the format:
x-man-page:///<keyword>;type=a
where <keyword>
is the keyword to search for. Examples of apropos keyword
search, using the open
command in a terminal window:
open "x-man-page:///print;type=a"
open "x-man-page:///regex;type=a"
The Terminal.app
allows one or more slashes before the <keyword>
part of
the URL. All of these variations are accepted:
open "x-man-page:///regex;type=a"
open "x-man-page:/regex;type=a"
A <section>
can be given for apropos search URLs, but is ignored.
# section "1" is ignored
open "x-man-page://1/print;type=a"
Sources of information on the x-man-page
scheme: