Skip to content

ack -c giving zero count #623

@Smylers

Description

@Smylers

ack | wc -l is giving me 110 lines, but ack -c is counting 0.

I don't think this is Issue #563, cos that's specific to overcounting matches, which clearly doesn't apply here.

$ ack  '^(?=.*(\w)(?!\1)(\w)\2\1)(?!.*\[[^]]*(\w)(?!\3)(\w)\4\3)' ack_zero_count_input.txt | wc -l
110

$ ack -c '^(?=.*(\w)(?!\1)(\w)\2\1)(?!.*\[[^]]*(\w)(?!\3)(\w)\4\3)' ack_zero_count_input.txt
0

Here's the input file:
ack_zero_count_input.txt

I haven't yet tried to minimize this, to narrow down what about that pattern or input is causing this. -c is still working fine for me in other situations. This is ack 2.14.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions