How do I make the
most pager properly display colours in text received from standard‑input?
Note: I'm not sure whether or not it's a bug in
I am not encountering the same issue with
more, only with
most, which otherwise works nicely as a pager used by
I'm not posting an image, and invite people to try this (only if you have
$ command apropos zip | command grep --color=always zip | command less $ command apropos zip | command grep --color=always zip | command more $ command apropos zip | command grep --color=always zip | command most
more properly display colours, while
most displays colours with additional “garbage”
^[[K wrapping all coloured text areas.
Surprisingly, this is OK:
$ (export PAGER=most; command man zip)
Am I missing something (the manual page for
most did not help), misusing the command or is this something which I should report as a bug?
A note on
As Sparhawk mentioned in a comment,
less does not work either if it's not given the option
--raw-control-chars), which may also be set in the
LESS environment variable.
And indeed, I first searched for a similar option for
most (but failed to find one).
All have issues with coloured UTF‑8 encoded text, not just
most. In my case, the terminal is fine with it, so that's not the terminal. The same uncoloured UTF‑8 text is fine with all three pagers, so that's not the characters encoding.