[Bug 8186] less: add -r/-R support for handling of raw ansi control codes

bugzilla at busybox.net bugzilla at busybox.net
Mon Jan 22 12:20:41 UTC 2018


https://bugs.busybox.net/show_bug.cgi?id=8186

--- Comment #5 from Lubomir Rintel <lkundrak at v3.sk> ---
A cover letter that I sent to the list before it rejected my message:

Hi,

chained are two patches that add make the less applet behave well with
tools that use coloring and paging at the same time. My first busybox
patches, so I beg for some understanding if I didn't get things right.

Issues have been reported for nmcli, systemd and git upstreams (perhaps
more) all of the falling victim to a rather reasonable assumption that
a thing called "less" behaves like "less" (in support of "-R" option
in particular). I guess the implausibility of teaching all of the
affected tools to do some sort of capability assessment of pager's
capabilities justifies the slight growth in the applet size.

An alternative way would be to use the "more" applet instead somehow.
All of the afforementioned tools prefer "less" over "more" for obvious
reasons, but perhaps the busybox applet could just dispatch to "more" if
it sees a "LESS" environment variable with options it doesn't
understand. "more" works well with ANSI control sequences, at the cost
of not being able to scroll backwards.

Thank you,
Lubo

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list