[Bug 8186] New: man displays raw ANSI code for color escapes because of missing less -R

bugzilla at busybox.net bugzilla at busybox.net
Sun Jun 28 10:59:57 UTC 2015


           Summary: man displays raw ANSI code for color escapes because
                    of missing less -R
           Product: Busybox
           Version: 1.23.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Other
        AssignedTo: unassigned at busybox.net
        ReportedBy: arthur200126 at 163.com
                CC: busybox-cvs at busybox.net
   Estimated Hours: 0.0

When busybox is configured to ENABLE_LESS, running `busybox man docs/busybox.1`
creates output with lots of escaped ANSI escape sequences like `\e[1m`.

The commonly-used full version of less, less 458 from
www.greenwoodsoftware.com/less, has an option -R which asks less to output raw
ANSI color chars:

>       -R or --RAW-CONTROL-CHARS
>              Like  -r,  but  only ANSI "color" escape sequences are output in
>              "raw" form.  Unlike -r, the screen appearance is maintained cor-
>              rectly  in  most  cases.   ANSI  "color"  escape  sequences  are
>              sequences of the form:
>                   ESC [ ... m
>             where the "..." is zero or more color  specification  characters
>             For  the  purpose  of  keeping  track of screen appearance, ANSI
>             color escape sequences are assumed to not move the cursor...

But busybox less doesn't support such thing at all.

Extra info:

Working mans:

    PAGER='less -R' busybox man docs/busybox.1
    PAGER='more' busybox man docs/busybox.1
    PAGER='busybox more' busybox man docs/busybox.1

Failing mans:

    PAGER='less' busybox man docs/busybox.1
    PAGER='busybox less' busybox man docs/busybox.1

Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the busybox-cvs mailing list