From 2408f5c6084aa04a09b36edcd264ce6bc7177c93 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 9 Sep 2016 15:06:54 -0400 Subject: addurl, get: Added --json-progress option, which adds progress objects to the json output. This doesn't work right when used with -J yet, and there is some really ugly hand-crafting of part of the json output. --- CmdLine/GitAnnex/Options.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'CmdLine') diff --git a/CmdLine/GitAnnex/Options.hs b/CmdLine/GitAnnex/Options.hs index 1c360de19..92724d03d 100644 --- a/CmdLine/GitAnnex/Options.hs +++ b/CmdLine/GitAnnex/Options.hs @@ -286,12 +286,19 @@ combiningOptions = shortopt o h = globalFlag (Limit.addToken [o]) ( short o <> help h <> hidden ) jsonOption :: GlobalOption -jsonOption = globalFlag (Annex.setOutput JSONOutput) +jsonOption = globalFlag (Annex.setOutput (JSONOutput False)) ( long "json" <> short 'j' <> help "enable JSON output" <> hidden ) +jsonProgressOption :: GlobalOption +jsonProgressOption = globalFlag (Annex.setOutput (JSONOutput True)) + ( long "json-progress" <> short 'j' + <> help "include progress in JSON output" + <> hidden + ) + -- Note that a command that adds this option should wrap its seek -- action in `allowConcurrentOutput`. jobsOption :: GlobalOption -- cgit v1.2.3