Too Cool for Internet Explorer

Colored Manpages

colored-manpages

Manpages 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:

colored man pages - the easy approach

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.

1 Comment »

RSS feed for comments on this post. TrackBack URI

  1. http://mt13.quickshareit.com/share/terminallessd66a0.jpg
    nice ;)

    Comment by Nils — June 6, 2008 #

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Powered by WordPress with GimpStyle Theme design by Horacio Bella. Get Entries and comments.