summaryrefslogtreecommitdiffhomepage
path: root/CmdLine.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2017-04-21 22:35:57 -0400
committerJoey Hess <joeyh@joeyh.name>2017-04-21 22:35:57 -0400
commit94a94c36cf0eba38b85b8fb6c360c14abae7031f (patch)
tree0e13740582f22f19aa5bd3c24fa53f3cc7c7ca47 /CmdLine.hs
parent75c8b6b9745ea8e64383e28d3f18b1609be00fa3 (diff)
downloaddebug-me-94a94c36cf0eba38b85b8fb6c360c14abae7031f.tar.gz
added debug-me --watch mode
This commit was sponsored by Ewen McNeill.
Diffstat (limited to 'CmdLine.hs')
-rw-r--r--CmdLine.hs14
1 files changed, 13 insertions, 1 deletions
diff --git a/CmdLine.hs b/CmdLine.hs
index 9d30eb3..663c63e 100644
--- a/CmdLine.hs
+++ b/CmdLine.hs
@@ -12,6 +12,7 @@ data Mode
= UserMode UserOpts
| DeveloperMode DeveloperOpts
| DownloadMode DownloadOpts
+ | WatchMode WatchOpts
| GraphvizMode GraphvizOpts
| ReplayMode ReplayOpts
| ServerMode ServerOpts
@@ -28,6 +29,10 @@ data DownloadOpts = DownloadOpts
{ downloadUrl :: String
}
+data WatchOpts = WatchOpts
+ { watchUrl :: String
+ }
+
data GraphvizOpts = GraphvizOpts
{ graphvizLogFile :: FilePath
, graphvizShowHashes :: Bool
@@ -50,6 +55,7 @@ parseMode = (UserMode <$> parseuser)
<|> (DeveloperMode <$> parsedeveloper)
<|> (ReplayMode <$> parsereplay)
<|> (DownloadMode <$> parsedownload)
+ <|> (WatchMode <$> parsewatch)
<|> (GraphvizMode <$> parsegraphviz)
<|> (ServerMode <$> parseserver)
where
@@ -76,9 +82,15 @@ parseMode = (UserMode <$> parseuser)
parsedownload = DownloadOpts
<$> option str
( long "download"
- <> metavar "logfile"
+ <> metavar "url"
<> help "download log file from server"
)
+ parsewatch = WatchOpts
+ <$> option str
+ ( long "watch"
+ <> metavar "url"
+ <> help "display a debug-me session non-interactively"
+ )
parseserver = ServerOpts
<$> option str
( long "server"