Show HN: Grep with colours written in Go
github.com
Show HN: Grep with colours written in Go
1–10 of 90 posts
Re: Show HN: Grep with colours written in Go
#2[deleted]
Re: Show HN: Grep with colours written in Go
#3Nice 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
#4Is this speed competitive with tools like the silver searcher (`ag`) or is the focus here on color?
Re: Show HN: Grep with colours written in Go
#5Do be sure to at least consider supporting no colour! http://no-color.org
Re: Show HN: Grep with colours written in Go
#6Useless use of cat candidate.
Re: Show HN: Grep with colours written in Go
#7Do be sure to at least consider supporting no colour! http://no-color.org
What a great idea for a standard, so the tool will check the NO_COLOR environment variable, to see if it should display color.
Re: Show HN: Grep with colours written in Go
#8Is 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`.
Re: Show HN: Grep with colours written in Go
#9Really cool! But from the title I initially thought this was a grep tool for finding certain colors in your image data.
Re: Show HN: Grep with colours written in Go
#10Useless use of cat candidate.
[deleted]