News for hackers. Stuff that matters.
Re:Disabling ANSI color output by makecheck on Wednesday February 07, 2018 @02:15AM (#16322791)
Color/styled text is a weird case, since it tends to be used for improving output (e.g. highlighting a “diff” or code syntax). It can be annoying to have all that helpful highlighting go away just because you added something like a pipe to “less” in your command to keep your text from scrolling away. The real problem is how a program is supposed to know when your pipe is meant to be interactive.

Technically terminals can play the interactive role in place of “less”: ^S/^Q, scrollback and search, etc. If that were more common, programs might not be misusing color/style sequences like this (as there wouldn’t be a common “interactive pipe” use case to support).

Re:Disabling ANSI color output by jcoffland on Wednesday February 07, 2018 @02:36AM (#16322851)
Use 'less -r' to display ANSI color in less.
Re:Disabling ANSI color output by racer-v on Wednesday February 07, 2018 @01:26PM (#16326749)
Crazy idea - what if other utilites were aware of ANSI codes and behaved appropriately? For example 'grep' could ignore color sequences when doing pattern-matching, and then re-apply the colors to the output. Then you could do something like `git log | grep` and see the original coloration in the output.
Re:Disabling ANSI color output by dragonwriter on Wednesday February 07, 2018 @05:57PM (#16328740)
> Crazy idea - what if other utilites were aware of ANSI codes and behaved appropriately?

If ANSI sequences were only color, they might be feasible; getting a clear idea on what “appropriately” means for general ANSI content in a text stream is... difficult.

Re:Disabling ANSI color output by racer-v on Wednesday February 07, 2018 @08:12PM (#16329388)
I'd be happy with just the Graphic parameters https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_G...
Re:Disabling ANSI color output by thisacctforreal on Wednesday February 07, 2018 @05:03AM (#16323395)
I wonder if tmux or iTerm2 could have an option to not autoscroll the command off the screen.