ack --column -v triggers uninitialized value warning
rscharfe opened this issue · comments
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).
--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
.
This is fixed in ack 3. There will be no more relreases of ack 2.