I can't ask ack to ignore binary files, in this case, images.
> I can't ask ack to ignore binary files, in this case, images.
>
> Tested in debian 6.0, ack packaged version ack-grep 1.92 and latest
> binary version 1.96.
> the log below is tested using latest standalone version.
>
> Maybe I'm doing something wrong, but I just can't figure it out.
>
> Here is the console log of the problem:
> ~/html/yxy-business $ file src/collections/动物/斑马家族2.jpg
> src/collections/动物/斑马家族2.jpg: JPEG image data, EXIF standard
> ~/html/yxy-business $ perl -e 'if (-B "src/collections/动物/
> 斑马家族2.jpg") {print "binary\n";} else {print "no\n";}'
> binary
> ~/html/yxy-business $ ack --version
> ack 1.96
> Running under Perl 5.10.1 at /usr/bin/perl
>
> Copyright 2005-2011 Andy Lester.
>
> This program is free software. You may modify or distribute it
> under the terms of the Artistic License v2.0.
> ~/html/yxy-business $ ack '(TODO[^s]|FIXME|BUG)' src/collections/
> 动物/* Binary file src/collections/动物/斑马家族2.jpg matches
> ~/html/yxy-business $ ack --nobinary '(TODO[^s]|FIXME|BUG)' src/
> collections/动物/*
> Binary file src/collections/动物/斑马家族2.jpg matches
> ~/html/yxy-business $
>
It seems you're doing the following:
ack '(TODO[^s]|FIXME|BUG)' src/collections/动物/*
Your shell will expand the wildcard to include 斑马家族2.jpg, and ack
*always* searches regular files that are provided directly on the
command line.
-Rob
ack '(TODO[^s]|FIXME|BUG)' src/collections/动物/*
Your shell will expand the wildcard to include 斑马家族2.jpg, and ack
*always* searches regular files that are provided directly on the
command line.
--
You received this message because you are subscribed to the Google Groups "ack dev/users" group.
To post to this group, send email to ack-...@googlegroups.com.
To unsubscribe from this group, send email to ack-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ack-users?hl=en.