2

Problem: to change the bolding which affects the word "expression" to the color yellow in Less: alt text http://files.getdropbox.com/u/175564/man-bolding-highlight.png

My commands which affects Less

export LESS_TERMCAP_mb=$'\E[01;31m'     # begin blinking
export LESS_TERMCAP_md=$'\E[01;31m'    # begin bold          
export LESS_TERMCAP_me=$'\E[0m'        # end mode
export LESS_TERMCAP_se=$'\E[0m'        # end standout-mode
export LESS_TERMCAP_so=$'\E[01;44;33m' # begin standout-mode
export LESS_TERMCAP_ue=$'\E[0m'        # end underline
export LESS_TERMCAP_us=$'\E[01;32m'    # begin underline

How can you change the bolding to yellow?

HopelessN00b
  • 53,385
  • 32
  • 133
  • 208
  • Erm, I'm not quite sure what you're asking. "expression" appears to be formatted identically to every other word in your example. – David Pashley Jul 02 '09 at 17:43
  • The following question is my main problem: http://serverfault.com/questions/35187/unable-to-understand-a-line-of-lesstermcap – Léo Léopold Hertz 준영 Jul 02 '09 at 17:46
  • @David: That is the problem. The expression is actually a link which I neither noticed initially. I observed that it is a link in Info. --- It is slightly different from others so I assume that its font must be in bold. – Léo Léopold Hertz 준영 Jul 02 '09 at 17:49

2 Answers2

4

My manpage on debian/lenny has a different content, but I think you are searching for LESS_TERMCAP_us. give this a try:

export LESS_TERMCAP_us=$'\E[01;33m'    # begin underline is now yellow
ThorstenS
  • 3,084
  • 18
  • 21
  • 1
    @ThorntenS: Which source did you use to find the command? --- I have not found docs about LESS_TERMCAP's syntax. – Léo Léopold Hertz 준영 Jul 02 '09 at 20:12
  • I didn`t kneew anything about LESS_TERMCAP. But I'm using escape sequences like \E[01;33m for years in e.g. $PS1. A little try`n error together with Mr. membrain brought the solution... – ThorstenS Jul 02 '09 at 21:43
1

The result after ThornstenS' answer

alt text http://files.getdropbox.com/u/175564/man-link.png

My code for Less

     export LESS_TERMCAP_mb=$'\E[01;31m'         # begin blinking
     export LESS_TERMCAP_md=$'\E[01;38;5;74m'    # bold in blue
     export LESS_TERMCAP_me=$'\E[0m'        # end mode

     export LESS_TERMCAP_se=$'\E[0m'        # end standout-mode
     export LESS_TERMCAP_so=$'\E[38;5;246m' # begin standout-mode - info box
     export LESS_TERMCAP_ue=$'\E[0m'        # end underline

     export LESS_TERMCAP_us=$'\E[04;33;146m'    # begin underline is now yellow
     #                             |  |  |
     #                             |  |----------------- yellow
     #                             |-------------------- underline

It is now much easier to read docs :)

Thank you ThorntenS!