seduction
 Language:
Welcome, Guest. Please login or register.
Did you miss your activation email?
2020/10/25, 23:31:36


Help

Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: [solved] man page colors  (Read 478 times)

0 Members and 1 Guest are viewing this topic.

Offline jyp

  • User
  • Posts: 86
[solved] man page colors
« 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
« Last Edit: 2020/09/19, 23:54:48 by jyp »

Offline AxL

  • User
  • Posts: 5
Re: man page colors
« Reply #1 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:





See also:








Cheers!!   ;)
« Last Edit: 2020/09/19, 23:32:02 by AxL »

Offline jyp

  • User
  • Posts: 86
Re: [solved] man page colors
« Reply #2 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= ...>


Offline AxL

  • User
  • Posts: 5
Re: [solved] man page colors
« Reply #3 on: 2020/09/20, 15:27:26 »
Thanks a lot. Problem solved.

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







Cheers!   8)