Live data from Hacker News

Grc - it's like stylesheets for your terminal

wynnnetherland.com

21–30 of 39 posts

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

#23
post #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 ʎ"

for the record he uses \u26A1 aka high voltage sign ;-)

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

#24
post #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…

You are so cool. How can I be cool like you are cool?

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

#25
post #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…

You are so cool. How can I be cool like you are cool?

echo -e '\033[0;32m'

EDIT: Of course, real hackers use a rainbow shell prompt. (http://www.termsys.demon.co.uk/vtansi.htm) Building one of these is left as an exercise for the reader.

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

#26

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…

I had an idea like this a while back, but as far as I know there is no shell support for it. Basically, you would install decorators in your current shell instance. The decorator could act as a filter for all stream io. Then you would not need any special commands or aliases, just configuration for how to highlight patterns.

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

#27
post #22
post #12

I use different .Xdefaults for my shell "styling" and are incredibly happy with it. Changing to another theme is just one xrdb -merge away.

this goes a little further i guess. you can add color to regexp matches for command outputs.

Apparently. Judging from what it does the implementation could be a nice example of layering shell tools on top of each other to get new functionality. Probably it has some uses for people that work entirely with the shell.

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

#28
This is interesting - I actually wrote a tool very similar to Grc a while back:

http://pypi.python.org/pypi/rad

It uses the same idea of config files specifying what regexes to look for and how to color them. This tools looks a little more full-featured and tested though.

Also, I only thought of applying it to highlighting log files. I didn't think of using aliases to improve the appearance of regular terminal commands.

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

#29
post #5

Over the years this has been a hobby of mine to colorize the shell on Linux or at least make it easier on my eyes. The best results I've had relied on the following features: 1. Screen. Screen allowed me to colorize the hardstatusline at the bottom of the page. You can also set the hardstatus line so it updates to show the open application. Watch the video at the bottom of the screen and when I open Vim and how it up…

Thanks. Actually, that video is about cut-n-paste. The michaelkelleher.info site mentioned in the video no longer works. Do you have an updated one?

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

#30
post #15

We start by assuming everyone uses OSX.

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

Post reply on HN