Hacker News new | ask | show | jobs
by petercooper 5175 days ago
This script inserts terminal escape sequences into text.

I understand that part. But there's a screenshot where a "ping" is being done at a normal looking terminal and it just works without being explicitly piped through a program that does the above. What's the mechanism for piping all the terminal output through another process?

2 comments

The initial grc command aliases commands like 'ping' to a modified command that processes the output[1].

[1] https://github.com/mxcl/homebrew/blob/7bbe7e9311ce95a141bf5f...

Ahh, aliases. Thanks :-) Makes sense. I was probably dreaming of a world where it'd pick up an IP address by regex in any terminal output.
Those are supplied if you source the aliases that ship with the Homebrew formula: https://github.com/mxcl/homebrew/blob/7bbe7e9311ce95a141bf5f...