As much as I’m perfectly capable of getting around via the Unix command line, I won’t pretend I’m fluent or comfortable in that environment. Usually, I just spend some time figuring out the syntax and all the obscure little switches for some command, then record it in NoteBook so I don’t have to go through the process again if I don’t remember everything the next time I need the command.
In that process of learning how to express a particular Unix command, I rely on the Unix man pages, like everyone else. Just type "man commandName" at the command line and you’re presented with documentation that at least approximates helpful information on the command in question.
Unfortunately, since the man command uses another Unix tool called less to display the information, if the man entry fills more than a screen, you can’t easily scroll back up in the Terminal window to refer back to something at the beginning. Although you can of course scroll around in less itself using the d and u keys – refer to the man page for less for details – I prefer to stick to Macintosh programs and interface conventions whenever possible. I also find myself jumping in and out of a particular man page while I’m figuring out a command, at least until I realize what I’m doing and open another Terminal window.
Fixing the Man — So, if you’re like me, and occasionally need to refer to a man page but are annoyed by the user experience of working with man pages in a Terminal window, check out Carl Lindberg’s ManOpen 2.4, which is a free Mac OS X application for viewing man pages in normal Macintosh windows. It’s a simple program, but has a number of useful features, including:
A list of all available man pages, presented both as one big list and broken up into a number of categories. This is helpful if you’re not exactly sure which man page you need and want to browse through the possibilities.
An Apropos menu item that lets you search across all available man pages. If you’re really not sure which man page you want, the Apropos command can help you narrow the choices.
A nice remapping of Command-O from Open File (which opens any text file) to Open Man Page, which lets you type the name of the man page you want to open.
A hierarchical Open Recent menu that lists man pages you’ve examined recently.
A button in every window that, when clicked, tries to open a man page whose name corresponds with the selected text. Since a lot of man pages contain a See Also section listing related man pages, this button simplifies following cross-references.
A basic Find function that locates specified text within the open window, which is quite handy on longer man pages.
A Unix command line utility called openman that you can use at the command line to open man pages in ManOpen. Since you’re often working at the command line when you want to refer to a man page, it can be more convenient to use the openman command than to launch ManOpen manually from the Finder.
Improving the Man — As much as I appreciate how ManOpen improves the experience of working with man pages, there’s plenty of room for improvement, should anyone be interested in working with the source code that Carl Lindberg provides. A few thoughts:
I’d like to see ManOpen automatically build links for words in man pages that correspond to the names of other man pages. That would make moving around within the document space of the man pages even easier.
It would also be nice if URLs were made clickable in the man page text; this is apparently already the case in the OpenStep version of ManOpen.
A drawer listing all the commands, with controls to switch between the full alphabetical list and a disclosure triangle-enabled categorized list, would make browsing the list of man pages easier.
Including a permanent Search field at the top of every window would simplify the process of searching within a man page window.
Although you can change the font and set the window size for new windows, ManOpen could be smarter about making sure the window is large enough to display its contents.
Despite these desires, ManOpen is plenty useful in its current incarnation, and I’ve installed it everywhere I find myself using man pages. It’s a great example of how using a graphical interface can improve the Unix experience for those who prefer a graphical approach. For other opinions about the process of viewing man pages, check out the TidBITS Talk discussion on the topic.