From 7f7ae7a3b1cdfbc61879189dfe04a637690015aa Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 22 Nov 2011 14:06:31 -0400 Subject: find: Support --print0 It would be nice if command-specific options were supported. The first difficulty is that which command is being called is not known until after getopt; but that could be worked around by finding the first non-dashed parameter. Storing the settings without putting them in the annex monad is the next difficulty; it could perhaps be handled by making the seek stage pass applicable settings into the start stage (and from there on to perform as needed). But that still leaves a problem, what data type to use to represent the options between getopt and seek? --- doc/forum/--print0_option_as_in___34__find__34__.mdwn | 2 ++ doc/git-annex.mdwn | 3 +++ 2 files changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/forum/--print0_option_as_in___34__find__34__.mdwn b/doc/forum/--print0_option_as_in___34__find__34__.mdwn index cd537f8ad..7d9a2284d 100644 --- a/doc/forum/--print0_option_as_in___34__find__34__.mdwn +++ b/doc/forum/--print0_option_as_in___34__find__34__.mdwn @@ -1,3 +1,5 @@ It would be nice if git annex find supported a --print0 option as GNU find does. That way, file names that are printed could be piped to xargs even if they have spaces. + +> Done. --[[Joey]] diff --git a/doc/git-annex.mdwn b/doc/git-annex.mdwn index e91e5a0e3..c225529de 100644 --- a/doc/git-annex.mdwn +++ b/doc/git-annex.mdwn @@ -232,6 +232,9 @@ subdirectories). With no parameters, defaults to finding all files in the current directory and its subdirectories. + To output filenames terminated with nulls, for use with xargs -0, + specify --print0. + * whereis [path ...] Displays a list of repositories known to contain the content of the -- cgit v1.2.3