converted Assistant and Watch; avoid duplicate arg parsing for no repo mode
This commit is contained in:
parent
084f8d9ac7
commit
b95a48fe45
6 changed files with 71 additions and 70 deletions
|
@ -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"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue