It seems fnmatch(3) args were accidentally swapped. Try

  $ bsdgrep -Fr --exclude-dir '*.svn*' grep_ usr.bin/grep | bsdgrep -c svn
  72

%%
Index: usr.bin/grep/util.c
===================================================================
--- usr.bin/grep/util.c (revision 224705)
+++ usr.bin/grep/util.c (working copy)
@@ -84,7 +84,7 @@ dir_matching(const char *dname)
 
        for (unsigned int i = 0; i < dpatterns; ++i) {
                if (dname != NULL &&
-                   fnmatch(dname, dpattern[i].pat, 0) == 0) {
+                   fnmatch(dpattern[i].pat, dname, 0) == 0) {
                        if (dpattern[i].mode == EXCL_PAT)
                                return (false);
                        else
%%
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[email protected]"

Reply via email to