You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because File::Next only returns existing files, there's no way to use "-" interpreted as stdin -- it gets filtered out before ack gets to see it (except see notes 1-2 below).
Example:
$ cat file
xbyz
$ ack b. - <file # bug
$ # expected was to read stdin and find a match
$ touch ./- # watch what happens
$ ack b. - <file # as expected, but for wrong reasons, note-1
xbyz
$ ack b. ./- # as expected, note-2
$
Notes 1-2 show that ack b. - <file is testing ./- for file existance, but reading stdin.
Possible fixes are changing the sort order from that specfied on the command line (so that you can pull out "-" before File::Next sees it), which is undesirable, or changing File::Next (because of possible name sorting, I couldn't see how to do this otherwise), or maybe something much more exotic with how File::Next is invoked (I looked hard at this first).
Because File::Next only returns existing files, there's no way to use "-" interpreted as stdin -- it gets filtered out before ack gets to see it (except see notes 1-2 below).
Example:
Notes 1-2 show that
ack b. - <file
is testing ./- for file existance, but reading stdin.Possible fixes are changing the sort order from that specfied on the command line (so that you can pull out "-" before File::Next sees it), which is undesirable, or changing File::Next (because of possible name sorting, I couldn't see how to do this otherwise), or maybe something much more exotic with how File::Next is invoked (I looked hard at this first).
Tested against http://beyondgrep.com/ack-2.14-single-file on Ubuntu 14.04.
The text was updated successfully, but these errors were encountered: