The Haiku/BeOS Tip Server
Tips and tricks for Haiku/BeOS users

Invoke man pages from the Terminal

Contributed by: Joshua Rodman
This tip is valid for: Both BeOS and Haiku

Update: It’s now possible to install the real man utility, making this tip obsolete for some users.

Using the BeOS terminal environment can be frustrating when you can’t remember how a command works. BeOS includes a small collection of man pages formatted in HTML. This tip sets up the familiar (to UNIX folks) man for shell command documentation.

You can add the following shell function to your environment by creating or adding to your /boot/home/.profile. It simply looks for html files in the directory /boot/beos/documentation/Shell Tools/man1, and attempts to launch NetPositive to view them. Feel free to set up and substitute lynx for a terminal-only solution.

function man ()
  if test -f /boot/beos/documentation/Shell Tools/man1/$1.html ; then
    NetPositive file:///boot/beos/documentation/Shell Tools/man1/$1.html
    echo "No manual entry for $1"

Posted in Terminal

(comments are closed).