summaryrefslogtreecommitdiff
path: root/CmdLine/GitAnnex/Options.hs
diff options
context:
space:
mode:
authorJoeyHess <>2019-10-09 16:34:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2019-10-09 16:34:00 (GMT)
commit66f771a916b67bd08f4070487e79e4a4359fd852 (patch)
tree6e09eba777f8bcebac4f30093c63f3ffd029e741 /CmdLine/GitAnnex/Options.hs
parent09e89c7ef80c7e879bfe1376102101cca6baf130 (diff)
version 7.201910097.20191009
Diffstat (limited to 'CmdLine/GitAnnex/Options.hs')
-rw-r--r--CmdLine/GitAnnex/Options.hs32
1 files changed, 28 insertions, 4 deletions
diff --git a/CmdLine/GitAnnex/Options.hs b/CmdLine/GitAnnex/Options.hs
index 7be2e27..ae66588 100644
--- a/CmdLine/GitAnnex/Options.hs
+++ b/CmdLine/GitAnnex/Options.hs
@@ -282,6 +282,26 @@ keyMatchingOptions' =
<> help "match files accessed within a time interval"
<> hidden
)
+ , globalSetter Limit.addMimeType $ strOption
+ ( long "mimetype" <> metavar paramGlob
+ <> help "match files by mime type"
+ <> hidden
+ )
+ , globalSetter Limit.addMimeEncoding $ strOption
+ ( long "mimeencoding" <> metavar paramGlob
+ <> help "match files by mime encoding"
+ <> hidden
+ )
+ , globalFlag Limit.addUnlocked
+ ( long "unlocked"
+ <> help "match files that are unlocked"
+ <> hidden
+ )
+ , globalFlag Limit.addLocked
+ ( long "locked"
+ <> help "match files that are locked"
+ <> hidden
+ )
]
-- Options to match files which may not yet be annexed.
@@ -387,16 +407,20 @@ data DaemonOptions = DaemonOptions
, stopDaemonOption :: Bool
}
-parseDaemonOptions :: Parser DaemonOptions
-parseDaemonOptions = DaemonOptions
- <$> switch
+parseDaemonOptions :: Bool -> Parser DaemonOptions
+parseDaemonOptions canstop
+ | canstop = DaemonOptions <$> foreground <*> stop
+ | otherwise = DaemonOptions <$> foreground <*> pure False
+ where
+ foreground = switch
( long "foreground"
<> help "do not daemonize"
)
- <*> switch
+ stop = switch
( long "stop"
<> help "stop daemon"
)
+
completeRemotes :: HasCompleter f => Mod f a
completeRemotes = completer $ mkCompleter $ \input -> do
r <- maybe (pure Nothing) (Just <$$> Git.Config.read)