Add --entire/--non-entire.
    
        | author | Steve Losh <steve@stevelosh.com> | 
    
        | date | Tue, 06 Nov 2012 17:48:08 -0500 | 
    
    
        | parents | c6c954131eec | 
    
        | children | c6ddd259d01c | 
    
        | branches/tags | v0.3.0 | 
    
        | files | ffind | 
Changes
    
--- a/ffind	Wed Oct 31 18:22:25 2012 -0400
+++ b/ffind	Tue Nov 06 17:48:08 2012 -0500
@@ -423,7 +423,7 @@
             if get_type(path) not in options.type:
                 return False
 
-        if not query(basename):
+        if not query(path if options.entire else basename):
             return False
 
         stat = os.lstat(path)
@@ -511,6 +511,12 @@
     p.add_option('-v', '--invert',
                  action='store_true', default=False,
                  help='invert match')
+    p.add_option('-e', '--entire',
+                 action='store_true', default=False,
+                 help='match PATTERN against the entire path string')
+    p.add_option('-E', '--non-entire', dest='entire',
+                 action='store_false',
+                 help='match PATTERN against only the filenames (default)')
 
     # Case sensitivity
     g = OptionGroup(p, "Configuring Case Sensitivity")