Colored Manpages
Posted by micele - 05/06/08 at 10:06:16 pmManpages are a very appropriate instrument for documentation on linux und unix based systems. Unfortunately manpages have been invented in times of monochrome displays. Todays colored displays offer much more clearness and readability. Unfortunately manpages don’t - at least not by default…
I really tried hard to give my linux manpages more readability and finally - it worked. There are a lot of different (and also difficult) approaches. In my eyes the most easiest way is to simply add some less capabilities (less is used as the default man page browser) to enforce coloring. This can be done by using your favorite shell .rc for setting those capabilities. In my case i just added
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'
to my .zshrc. The result is quite satisfying and looks like this:

I really fell in love with man pages again. Ok, I confess: I sometimes really care about appearance
Update: While gentoo has some problems with the mentioned method it even works fine for mac.
Powered by WordPress with GimpStyle Theme design by Horacio Bella. Get Entries and comments.