summaryrefslogtreecommitdiff
path: root/Command/Find.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/Find.hs')
-rw-r--r--Command/Find.hs16
1 files changed, 9 insertions, 7 deletions
diff --git a/Command/Find.hs b/Command/Find.hs
index 6050ff7bb..91386bbd0 100644
--- a/Command/Find.hs
+++ b/Command/Find.hs
@@ -28,15 +28,17 @@ 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) $ do
- f <- Annex.getState Annex.format
- case f of
- Nothing -> liftIO $ putStrLn file
- Just formatter -> liftIO $ putStr $
- Utility.Format.format formatter vars
+ whenM (liftM2 (||) (inAnnex key) limited) $
+ unlessM (showFullJSON vars) $ do
+ f <- Annex.getState Annex.format
+ case f of
+ Nothing -> liftIO $ putStrLn file
+ Just formatter -> liftIO $ putStr $
+ Utility.Format.format formatter $
+ M.fromList vars
stop
where
- vars = M.fromList
+ vars =
[ ("file", file)
, ("key", show key)
, ("backend", keyBackendName key)