garbled man output

Denys Vlasenko vda.linux at googlemail.com
Sat Dec 10 20:00:01 UTC 2016


On Thu, Dec 8, 2016 at 11:55 PM, ..mg.. <shoemaker at riseup.net> wrote:
> Hi folks.
>
> On my busybox 1.25.1 setup, 'man' and 'less' are conspiring to mangle
> terminal control commands, like this for 'PAGER=less man bash':
>
> BASH(1)                     General Commands Manual                    BASH(1)
>
>
>
>  [1mNAME [0m
>        bash - GNU Bourne-Again SHell
>
>  [1mSYNOPSIS [0m
>         [1mbash  [22m[options] [command_string | file]
>
> except that I see the '^[' as  a reverse-video '['.
>
>
> Running 'PAGER=cat man bash' shows the correct formatting, and programs
> like nano and mutt run just fine.  TERM=linux and TERMINFO is the
> correct path to my terminfo database.

Your "man" generates color escapes and expects pager to understand them.
You can suppress with GROFF_NO_SGR=1 env var.


More information about the busybox mailing list