# HG changeset patch # User Steve Losh # Date 1352242088 18000 # Node ID 0f88e9f35bf1f2acab75065f46766976ecdb7d7b # Parent c6c954131eecac45080a72c1c0acda07f59df31d Add --entire/--non-entire. diff -r c6c954131eec -r 0f88e9f35bf1 ffind --- 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")