Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Problem: to change the bolding which affects the word "expression" to the color yellow in Less: alt text

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?

share|improve this question
    
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 2 '09 at 17:43
    
The following question is my main problem: serverfault.com/questions/35187/… –  Masi Jul 2 '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. –  Masi Jul 2 '09 at 17:49

2 Answers 2

up vote 4 down vote accepted

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
share|improve this answer
1  
@ThorntenS: Which source did you use to find the command? --- I have not found docs about LESS_TERMCAP's syntax. –  Masi Jul 2 '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 2 '09 at 21:43

The result after ThornstenS' answer

alt text

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!

share|improve this answer
    
I now need to understand how to use the links: serverfault.com/questions/35271/… –  Masi Jul 2 '09 at 20:19
    
you are welcome :) –  ThorstenS Jul 2 '09 at 21:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.