Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ack erroneously goes into filter mode #158

Closed
tstgruby opened this issue Mar 11, 2011 · 3 comments
Closed

ack erroneously goes into filter mode #158

tstgruby opened this issue Mar 11, 2011 · 3 comments

Comments

@tstgruby
Copy link

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
Copy link

lloeki commented Apr 11, 2012

Workaround: #106 (comment)

@gedge
Copy link

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

Fugly.

@hoelzro
Copy link
Collaborator

hoelzro commented Aug 28, 2013

Migrated to ack2 queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants