# HG changeset patch # User Steve Losh # Date 1348342276 14400 # Node ID f393d2ad42d76a31b1ebf2ec4a99df5ff18f9969 # Parent 0dd807c320abc8a8a7da115a71f61d16639839e2 Implement -0. diff -r 0dd807c320ab -r f393d2ad42d7 ffind --- a/ffind Sat Sep 22 15:26:22 2012 -0400 +++ b/ffind Sat Sep 22 15:31:16 2012 -0400 @@ -27,8 +27,8 @@ options = None # Output ---------------------------------------------------------------------- -def out(s): - sys.stdout.write(s + '\n') +def out(s, line_ending='\n'): + sys.stdout.write(s + line_ending) def err(s): sys.stderr.write(s + '\n') @@ -63,7 +63,7 @@ path = os.path.join(dir, item) if not should_ignore(item, path): if match(query, path): - print path + out(path, '\0' if options.zero else '\n') is_dir = os.path.isdir(path) if is_dir: