Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 74985 - cluttered man pages
cluttered man pages
Product: Red Hat Linux
Classification: Retired
Component: man (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Eido Inoue
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2002-10-03 08:36 EDT by Phil Dumont
Modified: 2007-04-18 12:47 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-01-14 00:08:12 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Phil Dumont 2002-10-03 08:36:29 EDT
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:

Steps to Reproduce:
PAGER=less man ls

Additional info:
Comment 1 Eido Inoue 2003-01-14 00:08:12 EST
works with a standard 8.0 config with the standard pager. thanks for the tip though

Note You need to log in before you can comment on or make changes to this bug.