summaryrefslogtreecommitdiff
path: root/Seek.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Seek.hs')
-rw-r--r--Seek.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Seek.hs b/Seek.hs
index 59a85be88..bf0770f40 100644
--- a/Seek.hs
+++ b/Seek.hs
@@ -101,6 +101,9 @@ withField :: Option -> (Maybe String -> Annex a) -> (a -> CommandSeek) -> Comman
withField option converter = withValue $
converter =<< Annex.getField (Option.name option)
+withFlag :: Option -> (Bool -> CommandSeek) -> CommandSeek
+withFlag option = withValue $ Annex.getFlag (Option.name option)
+
withNothing :: CommandStart -> CommandSeek
withNothing a [] = return [a]
withNothing _ _ = error "This command takes no parameters."