I've been reading Terminal Tips and Tricks For Mac OS X when I came across this.
bman () {
gunzip < `man -w $@` | groff -Thtml -man | bcat
}
Apparently I should be able to view man pages
with some HTML mark-up if I save this function somewhere.
The problem is that I don't know which config file it should go into. Are there any other things I should be aware of when using the code above?
Best Answer
For the first part of your question, "What file should the command go in?": put the command in ~/.bash_profile using your favorite editor. For example, you can do this using
nano
by opening Terminal and typingType in the command and then press ctrl+X to exit. Say yes, you want to save the file.
For the second part, "Is there anything else I should know?": You are also going to need to install bcat, a program which allows you to send text to a browser via the command line. You can do this by running
in the terminal and entering your password.
Now you can view man pages in your browser by typing
bman
. For example: