Changing OSX Terminal Man Page Colors

For a long time, when I type man anything on my Mac, both the manpage header fonts and the background was black, so I had to use my mouse to highlight the manpage output to read it. It was really annoying.

The problem was the same both locally or using the terminal and going ssh somewhere.

Finally! I fixed it, thanks to this article in MacWorld !!

Set Terminal color via drag and drop | Utilities | Mac OS X Hints | Macworld

Here is a neat little trick I did to my ~/.bash_profile

function woman {
  tmpfile="/tmp/man ${*}.pdf"
  if [ \! -f "${tmpfile}" ]
  then
      man -t "${*}" | pstopdf -i -o "${tmpfile}"
  fi
  open "${tmpfile}"
}

now if you type 'woman' instead of 'man' it will export it to PDF...I posted this on my site and a guy posted his code that will export them to a tabbed page in safari, but I have not tested his script. It is in the comments section if you want to check it out.

Add PDF export of Man pages in OS X | tlarkin.com