René Scharfe [off-list ref] writes:
Am 10.05.2018 um 02:04 schrieb Junio C Hamano:
...
quoted
$ git grep -v second
$ git grep --not -e second
may hit all lines in this message (except for the obvious two
lines), but we cannot say which column we found a hit. I am
wondering if it is too grave a sin to report "the whole line is what
satisfied the criteria given" and say the match lies at column #1.
And if we are planning to use this to implement '-o', then I'd
suggest that we'd say the matched part of the line is the whole
thing (i.e. so is column #1, eo is at the eol).
quoted
By doing so, obviously we can sidestep the whole "this mode is
sometimes incompatible" and "I need to compute a lot to see if the
given expression is compatible or not" issues.
FWIW, Silver Searcher 2.1.0 does just that:
$ echo a | ag --column -v b
1:a
ripgrep 0.8.1 as well:
$ echo a | rg --column -v b
1:1:a
Thanks for additional datapoints.