From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020809 Description of problem: When I went from Red Hat release 7.2 to 7.3, my man pages started coming up ugly, with "cooked" escape sequences in them (the escape sequence was being printed as "ESC..."). I took a while, but I think I figured out what's going on. Apparently, in the transition from 7.2 to 7.3, the way that bold and underlined strings are formatted in the man page was changed. In 7.2, a character "X" was made bold with "X^hX", and underlined with "_^hX". In 7.3, whole strings are made bold/UL by surrounding them with escape sequences. The pager less has some built-in smarts for backspace handling, by default taking a "X^hX" or a "_^hX" in the input, and converting it in the output to the proper escape sequence to make it bold or underlined. This is true regardless of whether or not any of less's "raw" options are used. However, if the bold/underline escape sequence appears in the input, less does not do anything special with it. If a raw option is specified, escape characters get passed through untouched. If not, escape characters get converted to the string "ESC". I had in my environment "PAGER=less". This is a leftover from the days when I was working on a UNIX that used more (or pg -- ich!) as the default pager. Since I did not specify any options to less, I was getting the default behavior of cooked escape sequences, resulting in ugly man pages. Once I figured out the problem, the workaround was obvious. Get rid of the PAGER setting in my environment. Since man's default pager now does what I want (less, with the raw option), I don't need to specify my own. This bug can probably be resolved as a "no change". I mostly like the change. If you're going to have formatting characters in the page, having the escapes instead of the backspaces has some obvious advnatages: - you get your bolds/underlines even if you are not piping to a pager smart enough to know what to do with the backspaces -- even if the output is going direct to the terminal (assuming a smart enough terminal, which is *almost* always a safe assumption). - greps for strings that are bolded/ULed work The only thing I don't like is the trouble it caused me for a while. I'm mostly entering this bug as a public service to anyone else out there who might run into this problem and go looking in bugzilla for a solution (like I did). Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: PAGER=less man ls Additional info:
works with a standard 8.0 config with the standard pager. thanks for the tip though