beyondgrep / ack2

**ack 2 is no longer being maintained. ack 3 is the latest version.**
https://github.com/beyondgrep/ack3/
Other
1.48k stars 140 forks source link

ack --column -v triggers uninitialized value warning #665

Closed rscharfe closed 5 years ago

rscharfe commented 6 years ago

When using --column and -v together, the line number shown is an empty string and Perl complains about an uninitialized value:

$ echo foo | ack -H -v --column bar - Use of uninitialized value $line_parts[1] in join or string at /usr/bin/ack line 653, <STDIN> line 1. 1::foo

The -H is necessary due to issue #664. This is with ack 2.22.

Instead I'd expect not to be shown a warning, and possibly shown a column number of 1 (because the whole line matches).

petdance commented 6 years ago

--column should not be allowed with -v because there is no column to match against. Similar to if you try to do ack -f --column.

petdance commented 5 years ago

This is fixed in ack 3. There will be no more relreases of ack 2.