Closed fazjaxton closed 8 years ago
You're asking it to both descend through a tree AND search stdin. I don't see how that would make sense to do.
I don't want it to search through the tree. In this case I mean "." as the pattern (matching anything). The results are equivalent with "a":
$ ack a
searches the tree, and:
$ ack a -
ack: -: No such file or directory
Ah, ok, you want ack foo --filter
.
--[no]filter Force ack to treat standard input as a pipe
(--filter) or tty (--nofilter)
Oh, great! Thanks! Sorry, should have found that myself. :)
Not a problem. It took me a minute to find it myself. :-)
From the help text:
However, when no files are specified, ack recursively searches the current directory:
And when "-" is specified, it is treated as a file name:
I understand the usefulness of the first case, as this is probably what people mean 90+% of the time, but when the user explicitly asks for stdin (as in the second case), it would be nice to let them have it.