Open New man Page Windows from an Existing Terminal in OS X
The Mac OS X Terminal includes a great feature that lets you quickly access new manual pages from any existing Terminal window.
All you need to do is Right-click on a command or process name and select “Open man Page” from the contextual menu, this will create a new terminal window with the manual page of that command, outfitted in the lovely yellow man page theme.
Because this is built into Terminal.app, the contextual menu exists when using a localhost terminal or when connected to remote servers, regardless of the host operating system. Because Mac OS X shares much of it’s underlying architecture with other flavors of UNIX, OS X will usually be able to find and launch relevant man pages even when connecting to another operating system.
Remember that man pages can also be read on the go by saving them as a PDF and opening them with iBooks app on the iPad or iPhone.
Thanks – but this calls for more questions:
How can I add my own commands, such as the pipe:
“man -t .. | open -f -a /Applications/Preview.app”
to the context menu? (As preamble to saving the man text as PDF, say.)
And how to codify the “..” above to catch the right-clicked item?
There are fairly limited options and Terminal is not particularly customizable. What you wish to do is not entirely possible, but one is able to make some additions via the Services menu, and Applescripts can be added separately or launched utilizing osascript.