Live data from Hacker News

Show HN: Grep with colours written in Go

github.com

1–10 of 90 posts

Re: Show HN: Grep with colours written in Go

#3
Nice job! Language-specific coloring is really nice!

I'll give it a try. I normally use a different Golang tool called sift as my grep replacement (which I love so far): https://github.com/svent/sift

Sift's goals seem to be mostly performance (it is super fast), but it would be nice to have some of these more sophisticated coloring features in there as well, as they are useful.

Re: Show HN: Grep with colours written in Go

#8
post #4

Is this speed competitive with tools like the silver searcher (`ag`) or is the focus here on color?

A quick look at the source shows that it appears to be linear and just uses `strings.Contains` or `r.MatchString` on each line, so I don't think it has any of the optimizations that are built into `ag`.
Post reply on HN