paoloantinori/hhighlighter

feature: option to disable --passthru

Closed this issue · 3 comments

Example: I'm parsing a mail log and I just want to see when a message comes in and the line that prints the result of the spam filtering. For now, I have to insert a grep line into the pipeline before h. This is not all bad, though, since I can filter on one string and highlight another.

hi, thanks for your comment. Let me just be sure to get it right.
The behaviour you'd like to see is a flag to emulate normal "grep/ack" behaviour to filter out only relevant lines but to retain the preset colouring behaviour?

If that is the case, it's easy to achieve. But I wonder if instead, this should be implemented directly in ack, adding the automated rotation of colors.

phb95 commented

Hi,
Thanks for this great tool.
A small problem though, h was already an alias for me. So I renamed the h function hhighlighter and I added an alias hl='hhighlighter'.
Do you consider this to be normal user customization or whould you consider making h the default alias for a longer function name ?

Hi!

Thanks for your interest.
Yeah, I'd consider picking an alias different than h a user customization.
At the end h is just a tiny facade that I wrote because I need it in first person and I couldn't find anything already there. I am not expecting it to become so popular to have namespace clashes, so leaving it to the user with the suggested alias h is probably good enough for me.