ack3
ack3 copied to clipboard
ack should not hang on finding a file named "-"
If I specify $ ack foo - then ack should search standard input.
If it finds a file called - in the root of the tree, it shouldn't hang waiting for input from standard input.
This doesn't behave like this in ack2.
That's a weird one. But yes, the special handling for - should be for literally - in @ARGV not for - being returned by our recursive iterator ...
but if --verbose is on, we might want to throw a warning for any filename recursively found consisting of only punctuation and whitespace, or containing key special characters like ; or & !
See also #269.
This issue is actually worse than hinted above - having a file called - in the root of the tree causes ack to hang always, regardless of what arguments you give it
$ touch ./-
$ time ack Somethingorother
# (hangs forever)