Ubuntu – How to get color man pages under fish shell

colorsfishmanpage

There seems to be a way to get man pages to display in color (see here. It involves setting environment variables associated with less and adding these definitions to .bashrc. I tried doing the same in config.fish for the fish shell, but got no color output.

How to get color man pages in the fish shell?

Best Answer

You can set the configuration by the following commands,

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