diff options
Diffstat (limited to 'Command/Find.hs')
-rw-r--r-- | Command/Find.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Command/Find.hs b/Command/Find.hs index c816ff071..47058fa25 100644 --- a/Command/Find.hs +++ b/Command/Find.hs @@ -11,6 +11,7 @@ import Common.Annex import Command import Annex.Content import Limit +import qualified Annex def :: [Command] def = [command "find" paramPaths seek "lists available files"] @@ -22,6 +23,9 @@ start :: FilePath -> (Key, Backend Annex) -> CommandStart start file (key, _) = do -- only files inAnnex are shown, unless the user has requested -- others via a limit - whenM (liftM2 (||) (inAnnex key) limited) $ - liftIO $ putStrLn file + whenM (liftM2 (||) (inAnnex key) limited) $ do + print0 <- Annex.getState Annex.print0 + if print0 + then liftIO $ putStr (file ++ "\0") + else liftIO $ putStrLn file stop |