From 94a94c36cf0eba38b85b8fb6c360c14abae7031f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 21 Apr 2017 22:35:57 -0400 Subject: added debug-me --watch mode This commit was sponsored by Ewen McNeill. --- CmdLine.hs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'CmdLine.hs') 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" -- cgit v1.2.3