Terminal does not parse ANSI escapes in a pager, only on standard output
To reproduce, open any installed manpage with "man". The file is unreadable garbage, with lots of ESC[ characters. If you redirect the output of that "man" command to a file, and then open the file with "cat", Terminal displays it properly. However, this means you lose search and seek and the ability to get readable output from grepping a manpage. Marking this as a Beta 1 bug because unreadable manpages is or should be a blocker for most of our intended userbase. I'm reporting this bug on nightly hrev46791, but I believe it's reproducible all the way back to Alpha 3.
This might also be a bug with our version of "less", since ncurses apps like Tin or w3m work as expected.
Change History
(4)
Component: |
Applications/Terminal → Applications/Command Line Tools
|
Owner: |
changed from jackburton to nobody
|
Blocked By: |
10086 added
|
Resolution: |
→ duplicate
|
Status: |
new → closed
|
Blocked By: |
10086 removed
|
If you run
man ... | less -r
the man page looks OK as well. man can actually be configured to invoke less with this switch (in /system/settings/man.conf), but in the man sources one can find a comment that having to do that indicates some kind of misconfiguration. I don't know what that refers to exactly, but I think the first step should be to oursource and update our ancient less.