Live data from Hacker News

Grc - it's like stylesheets for your terminal

wynnnetherland.com

31–39 of 39 posts

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

#31

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…

To answer how programs like script (a little like ascii.io, but from decades ago and shipped with every Unix system), check out the manual page for forktty.

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

#33

Earlier quoted context omitted.

> Install via your favorite package manager. I'm on OS X so I use Homebrew:

In fairness I just installed grc on ubuntu and it is nothing like demonstrated on the blog because the homebrew version has extra stuff in it. So "Start by assuming OSX" isn't THAT much of a smarmy reply.

> because the homebrew version has extra stuff in it.

Lies! brew edit grc shows that it's just plain grc 1.4.

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

#34
post #21

Does anyone have trouble with tmux displaying colours? I tried a custom git log query that coloured the custom ordered responses. Rather than showing the text in colour, there were inline codes being displayed.

Does it work ok without tmux? If not, does git print directly to the terminal, or does it pipe to another program (like a pager)? Most programs make an isatty check in this case, but if you force printing of escape codes and pipe the output to less for example, you'll see the codes in the output instead of their effects.

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

#35
post #34
post #21

Does anyone have trouble with tmux displaying colours? I tried a custom git log query that coloured the custom ordered responses. Rather than showing the text in colour, there were inline codes being displayed.

Does it work ok without tmux? If not, does git print directly to the terminal, or does it pipe to another program (like a pager)? Most programs make an isatty check in this case, but if you force printing of escape codes and pipe the output to less for example, you'll see the codes in the output instead of their effects.

Actually, I think you're right, I probably was piping to less at the time (which tmux makes me do more of than usual).

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

#36
post #33

Earlier quoted context omitted.

In fairness I just installed grc on ubuntu and it is nothing like demonstrated on the blog because the homebrew version has extra stuff in it. So "Start by assuming OSX" isn't THAT much of a smarmy reply.

> because the homebrew version has extra stuff in it. Lies! brew edit grc shows that it's just plain grc 1.4.

At least the installation script adds some aliases to .bashrc.

https://github.com/mxcl/homebrew/blob/master/Library/Formula...

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

#37
Netherland - I installed this and gave it a try. I'm running into one major issue. I can't see my prompt (or the last line in whatever I'm doing). I don't mess around and invoke grc by doing 'grc bash'. This now listens for every command that's in the config file. Well the command I want to work most of all is ssh. When I ssh into another system I don't see my prompt. Any ideas what I can do to fix this?

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

#38
post #36
post #33

Earlier quoted context omitted.

> because the homebrew version has extra stuff in it. Lies! brew edit grc shows that it's just plain grc 1.4.

At least the installation script adds some aliases to .bashrc. https://github.com/mxcl/homebrew/blob/master/Library/Formula...

It suggests to, via you voluntarily typing

    echo 'source "`brew --prefix grc`/etc/grc.bashrc"' >> ~/.bashrc
Post reply on HN