summaryrefslogtreecommitdiff
path: root/Command/ExamineKey.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-05-06 13:44:53 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-05-06 13:44:53 -0400
commit2bbb276e38fb8503daccf7a419336d67c0a23c9c (patch)
treed796474a8b82bc5e79ae99a40ee93fd81cdf83a7 /Command/ExamineKey.hs
parent582fa3e2f10f1e1064314a8a1d9bb5aa5cf84f92 (diff)
contentlocation, examinekey, lookupkey: Added --batch mode option.
Diffstat (limited to 'Command/ExamineKey.hs')
-rw-r--r--Command/ExamineKey.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/Command/ExamineKey.hs b/Command/ExamineKey.hs
index 00d4d3a95..05db9817a 100644
--- a/Command/ExamineKey.hs
+++ b/Command/ExamineKey.hs
@@ -9,21 +9,22 @@ module Command.ExamineKey where
import Common.Annex
import Command
+import CmdLine.Batch
import qualified Utility.Format
import Command.Find (formatOption, getFormat, showFormatted, keyVars)
import Types.Key
cmd :: [Command]
-cmd = [noCommit $ noMessages $ withOptions [formatOption, jsonOption] $
+cmd = [noCommit $ noMessages $ withOptions [formatOption, jsonOption, batchOption] $
command "examinekey" (paramRepeating paramKey) seek
SectionPlumbing "prints information from a key"]
seek :: CommandSeek
seek ps = do
format <- getFormat
- withKeys (start format) ps
+ batchable withKeys (start format) ps
-start :: Maybe Utility.Format.Format -> Key -> CommandStart
-start format key = do
+start :: Maybe Utility.Format.Format -> Batchable Key
+start format _ key = do
showFormatted format (key2file key) (keyVars key)
stop