Closed pdl closed 5 years ago
Is your question about what is matching, or what is getting highlighted?
My main concern is that the first case seems wrong - line 3 should not match ^has .*[^\(]$
at all in my view. The rest is just observation in an attempt to work out why ack is matching line 3.
I believe this is fixed as in Git HEAD:
Ah, great - thanks!
@hoelzro says this is the same as #522
@pdl: Did you try the version on HEAD and verify it's been fixed to your satisfaction?
@petdance I can reproduce @hoelzro's result, it's fixed on the current state of dev, i.e. c92cb6c.
This doesn't seem to be fixed. I probably found the same issue with current master a1e0ba1b4c8df665e45d5a2013478f025dc2277d:
$ echo -e "xx \nxx\nfoo" > acktest
$ cat -n acktest
1 xx
2 xx
3 foo
$ echo acktest | ack --files-from=- 'x$' # correctly matches only line 2 but inconsistent with next command
acktest
2:xx
$ echo acktest | ack --files-from=- 'xx\s+$' # shouldn't match line 2
acktest
1:xx
2:xx
Reopening. Thanks for the update.
This is fixed in ack3. There will be no more releases of ack 2.
Given:
In the following case, line 6 is highlighted, line 3 is not. I didn't expect 3 to appear at all.
I can get what I want as follows (but I'd prefer not to have to add the
\n
)In this case, line 3 is highlighted:
In this case, it is not highlighted:
Is this intentional?
I'm on ack 2.14 running under Perl 5.20.2 on 64-bit Fedora.