Live data from Hacker News

Grc - it's like stylesheets for your terminal

wynnnetherland.com

11–20 of 39 posts

Re: Grc - it's like stylesheets for your terminal

#11

I'm sure someone here will know the answer for this off the top of their head so.. how does this work under the hood? How does it get to act as a sort of 'filter' for stdout? I've recently seen a system that can 'record' your terminal session for replay on the Web - http://ascii.io/ - whose 'recorder' forks off a psuedo terminal for this ( https://github.com/sickill/ascii.io-cli/blob/master/bin/asci... ). Would somet…

This script inserts terminal escape sequences into text. These sequences are just text that the terminal interpret as color transitions. Ascii.io transforms these terminal escape sequences into html/css, so Grc should work fine with it.

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?

Re: Grc - it's like stylesheets for your terminal

#13

Earlier quoted context omitted.

This script inserts terminal escape sequences into text. These sequences are just text that the terminal interpret as color transitions. Ascii.io transforms these terminal escape sequences into html/css, so Grc should work fine with it.

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?

Those are supplied if you source the aliases that ship with the Homebrew formula: https://github.com/mxcl/homebrew/blob/7bbe7e9311ce95a141bf5f...

Re: Grc - it's like stylesheets for your terminal

#14

Earlier quoted context omitted.

This script inserts terminal escape sequences into text. These sequences are just text that the terminal interpret as color transitions. Ascii.io transforms these terminal escape sequences into html/css, so Grc should work fine with it.

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?

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...

Re: Grc - it's like stylesheets for your terminal

#16
post #3

Solarized provides a great mapping table between terminal color names and various color spaces. Have to disagree slightly with this. Solarized is a great starting point, but, last time I checked, using the provided mapping table leads bold green, bold blue, and (most importantly) nonbold white to all become nearly-indistinguishable shades of grey. This alone damages the utility of the normally-colorized output of `ls…

Similar problem here - I tried Solarized for a while and found that it was too low contrast for my tastes.

I switched to Tim Pope's vividchalk.vim and have been quite happy ever since:

https://github.com/tpope/vim-vividchalk

Re: Grc - it's like stylesheets for your terminal

#18

Earlier quoted context omitted.

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?

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.

Re: Grc - it's like stylesheets for your terminal

#19
I don't give a rat ass for over coloring stuff in the terminal. I like when only what helps readability is colored.

But then again I do like some fancy stuff. And I noticed the author uses a unicode char in his prompt. While it breaks the \$ functionality ($|#) it looks neat, and I didn't think of that.

pretty cool export PS1="\u@\h \w ʎ"

Re: Grc - it's like stylesheets for your terminal

#20
Meh. Because I'm a Real Man with Real Big Balls I still think terminal text should come in one of three colors: green, amber, and page white. And you choose the color when you buy the terminal.

Kidding aside, I do do all my coding in an xterm that's had the font set to Glass Tty VT220 and the color set to one of those. Text decoration for highlighting purposes is done with our old friends bold, underline, and reverse video. But I'm retro like that.

Post reply on HN