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?

3
  • Erm, I'm not quite sure what you're asking. "expression" appears to be formatted identically to every other word in your example. Jul 2, 2009 at 17:43
  • The following question is my main problem: serverfault.com/questions/35187/… Jul 2, 2009 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. Jul 2, 2009 at 17:49

2 Answers 2

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
2
  • 1
    @ThorntenS: Which source did you use to find the command? --- I have not found docs about LESS_TERMCAP's syntax. Jul 2, 2009 at 20:12
  • I didnt kneew anything about LESS_TERMCAP. But I'm using escape sequences like \E[01;33m for years in e.g. $PS1. A little tryn error together with Mr. membrain brought the solution...
    – ThorstenS
    Jul 2, 2009 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!

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .