Andy Lester
Andy Lester
> The option would be clearer to me as --[no]stdin. I've thought about that, too. Note that there have been problems with expectations of ack's handling of stdin since the...
Indeed, you can't read from both STDIN and a regular file.
I'm seriously considering removing the implicit "figure out if ack is being a filter" or not. See the ticket referenced just above in the ack3 queue.
I think this will help in diagnosing beyondgrep/ack2#236
Do you have a custom file type set up in your .ackrc? What is it? How long have you been using it? Is your use case to only search QML...
Ultimately, I think we should whitelist the `$` vars that we allow to be used in `--output`. I see no reason to allow `$]` or similar in output.
I think that we want to not do eval on --output, and instead do the substitutions ourselves.
Shoot, I'd forgotten about those. Mark Fowler has a bunch of --output magic here, too: http://www.perladvent.org/2014/2014-12-21.html ``` ack --output='$&: @{[ eval "use LWP::Simple; 1" && length LWP::Simple::get($&) ]} bytes' \...
But is that capability overdoing ack's capabilities? That could just have easily been done like so: ``` ack 'https?://\S+' --output='$&' | perl -MLWP::Simple -e'......' ```
I'm OK with breaking backward compatability in the name of locking down the overly-wide-open door of `eval`.