diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-07-13 11:42:42 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-07-13 11:42:42 -0400 |
commit | 2228571a90fbe00b02ee1f22fab92c9e824093df (patch) | |
tree | 8de8ad7e28e5f8f393f42ae078b9c4ed5f448d13 /CmdLine/GitAnnex | |
parent | 93d62419262ca6ec924babe734780f7753d887a4 (diff) |
converted Assistant and Watch; avoid duplicate arg parsing for no repo mode
Diffstat (limited to 'CmdLine/GitAnnex')
-rw-r--r-- | CmdLine/GitAnnex/Options.hs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/CmdLine/GitAnnex/Options.hs b/CmdLine/GitAnnex/Options.hs index f95a4d03e..a050f57e3 100644 --- a/CmdLine/GitAnnex/Options.hs +++ b/CmdLine/GitAnnex/Options.hs @@ -285,3 +285,19 @@ timeLimitOption = globalSetter Limit.addTimeLimit $ strOption <> help "stop after the specified amount of time" <> hidden ) + +data DaemonOptions = DaemonOptions + { foregroundDaemonOption :: Bool + , stopDaemonOption :: Bool + } + +parseDaemonOptions :: Parser DaemonOptions +parseDaemonOptions = DaemonOptions + <$> switch + ( long "foreground" + <> help "do not daemonize" + ) + <*> switch + ( long "stop" + <> help "stop daemon" + ) |