Hi
It might be a silly question
But how to configure man pages to be coloured?
Used Manjaro some time ago and man pages had some highlights in other colours and so
In endeavouros, I tried setting the LESS… environment variables and also setting pager to most but none worked.
Please help
Just add the color definitions to your .bashrc or .zshrc:
# Color man pages
export LESS_TERMCAP_mb=$'\E[01;32m'
export LESS_TERMCAP_md=$'\E[01;32m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;47;34m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;36m'
# mandatory for colored man pages
export GROFF_NO_SGR=1 # For Konsole and Gnome-terminal
5 Likes
Hello,
LESS_TERMCAP_md is for bold and LESS_TERMCAP_us is for underline.
I am using bat. Cat clone with syntax highlighting and git integration
1 Like
And for the fish
users,
set -x LESS_TERMCAP_mb \e'[01;32m'
set -x LESS_TERMCAP_md \e'[01;32m'
set -x LESS_TERMCAP_me \e'[0m'
set -x LESS_TERMCAP_se \e'[0m'
set -x LESS_TERMCAP_so \e'[01;47;34m'
set -x LESS_TERMCAP_ue \e'[0m'
set -x LESS_TERMCAP_us \e'[01;36m'
set -x LESS -R
set -x GROFF_NO_SGR 1
2 Likes
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.