Siduction Forum

Siduction Forum => Software - Support => Topic started by: jyp on 2020/09/18, 21:39:49

Title: [solved] man page colors
Post by: jyp on 2020/09/18, 21:39:49
There is color in man pages but, dark red over black bg is not easy to read.
After googling a lot, nothing suggested had any effect.
The Arch Linux Wiki and many other web pages had instructions but no result.
Most referred to LESS_TERMCAP variable.
I tried to export LESS_TERMCAP data in ~/.bashrc with no effect at all.
Also tried to find out the configuration file for the color setup, but didn't find anything.

Any clue would be welcome.
Thanks
Title: Re: man page colors
Post by: AxL on 2020/09/19, 22:28:55
There is color in man pages but, dark red over black bg is not easy to read.
After googling a lot, nothing suggested had any effect.
The Arch Linux Wiki and many other web pages had instructions but no result.
Most referred to LESS_TERMCAP variable.
I tried to export LESS_TERMCAP data in ~/.bashrc with no effect at all.
Also tried to find out the configuration file for the color setup, but didn't find anything.

Any clue would be welcome.
Thanks

You should add this code in ~/.bashrc
 
(After adding the following code, you must reload the ~/.bashrc file, using the command source .bashrc in a terminal)

Code: [Select]
# Less Colors for MAN Pages

man() {
env \
LESS_TERMCAP_mb=$(printf "\e[1;35m") \
LESS_TERMCAP_md=$(printf "\e[1;35m") \
LESS_TERMCAP_me=$(printf "\e[0m") \
LESS_TERMCAP_se=$(printf "\e[0m") \
LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
LESS_TERMCAP_ue=$(printf "\e[0m") \
LESS_TERMCAP_us=$(printf "\e[1;31m") \
man "$@"
}
export MANPAGER='less -s -M +Gg'




Graphical example:

(https://i.imgur.com/PK3scpD.png)



See also:








Cheers!!   ;)
Title: Re: [solved] man page colors
Post by: jyp on 2020/09/19, 23:59:36
Thanks a lot. Problem solved.
There was snippets of code missing from my research on google.
Like <env \>
and
<export MANPAGER= ...>

Title: Re: [solved] man page colors
Post by: AxL on 2020/09/20, 15:27:26
Thanks a lot. Problem solved.

[...]
You're welcome!!   ;)







Cheers!   8)