ack erroneously goes into filter mode #158

tstgruby opened this Issue Mar 11, 2011 · 3 comments


None yet

4 participants

ack --help says:

ack may also search STDIN, but only if no FILE are specified, or if
one of FILES is "-".

When specifying an argument on the command line (and actually running ack as a subprocess on Windows), it says:

Ignoring 1 argument on the command-line while acting as a filter.

How about checking the condition the help was talking about:

if ( App::Ack::input_from_pipe() && scalar(@ARGV) == 0 ) {

\edit: sort of a duplicate of #106

lloeki commented Apr 11, 2012

Workaround: #106 (comment)

gedge commented Jan 8, 2013

I have to agree with tstruby on the title and validity of this issue.

On my (linux bash) shell, I get the same "Ignoring..." warning, which is counter-intuitive (and not grep-compatible), in the following:

grep foo bar.txt | while read foo; do ack $foo snafu.txt;done

This is broken - to fix, I use the workaround:

grep foo bar.txt | while read foo; do ack $foo snafu.txt < /dev/null ;done


hoelzro commented Aug 28, 2013

Migrated to ack2 queue.

@hoelzro hoelzro closed this Aug 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment