summaryrefslogtreecommitdiff
path: root/Command/Find.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-04-17 18:41:24 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-04-17 18:41:24 -0400
commite23a4eb3c9e9a6bc39a5a59fe45300e8fdfb0916 (patch)
treed3a75a3f65edb6f8a02b7ce54553e3a9960fcc34 /Command/Find.hs
parente9b6c350b15a93d82affadfabca18b3e95840cb1 (diff)
findref: New command, like find but shows files in a specified git ref.
Diffstat (limited to 'Command/Find.hs')
-rw-r--r--Command/Find.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Command/Find.hs b/Command/Find.hs
index bcf83729a..c800933f9 100644
--- a/Command/Find.hs
+++ b/Command/Find.hs
@@ -19,8 +19,10 @@ import Utility.DataUnits
import Types.Key
def :: [Command]
-def = [noCommit $ noMessages $ withOptions [formatOption, print0Option, jsonOption] $
- command "find" paramPaths seek SectionQuery "lists available files"]
+def = [mkCommand $ command "find" paramPaths seek SectionQuery "lists available files"]
+
+mkCommand :: Command -> Command
+mkCommand = noCommit . noMessages . withOptions [formatOption, print0Option, jsonOption]
formatOption :: Option
formatOption = fieldOption [] "format" paramFormat "control format of output"