| Summary: | less: add -r/-R support for handling of raw ansi control codes | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Mingye Wang <arthur200126> |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | busybox-cvs, holger |
| Priority: | P5 | ||
| Version: | 1.23.x | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Host: | Target: | ||
| Build: | |||
| Attachments: |
[PATCH 1/2] less: add support for -R option
[PATCH 2/2] less: accept the command line options from the environment variable |
||
|
Description
Mingye Wang
2015-06-28 10:59:57 UTC
Additions:
Working:
PAGER=less man docs/busybox.1
Failing
PAGER='busybox less' man docs/busybox.1
It seems that man-db has some special handling for less.
*** Bug 5546 has been marked as a duplicate of this bug. *** Created attachment 7436 [details]
[PATCH 1/2] less: add support for -R option
Created attachment 7441 [details]
[PATCH 2/2] less: accept the command line options from the environment variable
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 Added support to -R and $LESS in git |