beyondgrep / ack3

ack is a grep-like search tool optimized for source code.
https://beyondgrep.com/
Other
713 stars 66 forks source link

Don't Color `--output='$f'` #350

Open DabeDotCom opened 2 years ago

DabeDotCom commented 2 years ago

The following seems inconsistent:

ack ^root: --output='Matched line $. of file $f' /etc/passwd /dev/null
/etc/passwd       <-- green
12:Matched line 12 of file /etc/passwd
^^              ^^         ^^^^^^^^^^^
yellow          white      green

This PR makes it so only the "metadata" is colored, not the actual --output

[NOTE: This came up while I was working on my forthcoming PR, which will add a --no-lineno option...]