How to view man pages in color in Fish

Man pages in color
Man pages in color

When you open a man page you are confronted with a wall of white-on-black text. You may have noticed that man pages have some formatting information. This can be used to render the formatted elements in various colors. This can make reading and searching for information in a man page a pleasant affair.

To render man pages with colors in the Fish shell, add these lines to ~/.config/fish/

set -x LESS_TERMCAP_mb (printf "33[01;31m")  
set -x LESS_TERMCAP_md (printf "33[01;31m")  
set -x LESS_TERMCAP_me (printf "33[0m")  
set -x LESS_TERMCAP_se (printf "33[0m")  
set -x LESS_TERMCAP_so (printf "33[01;44;33m")  
set -x LESS_TERMCAP_ue (printf "33[0m")  
set -x LESS_TERMCAP_us (printf "33[01;32m")

Tried with: Fish 2.2b1 and Ubuntu 14.04

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.