aboutsummaryrefslogtreecommitdiff
path: root/Command.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-01-20 14:07:13 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-01-20 14:10:13 -0400
commit0c4e0046e72aab8216e3fe7d3f4252b1a66e1211 (patch)
treeb977261e78042cc6b11d530578a47a0d25d21359 /Command.hs
parentb51672003cf035ba4595f45746cac343d154266f (diff)
make noMessages disable closing of json object in --json mode
This allows things like Command.Find to use noMessages and generate their own complete json objects. Previouly, Command.Find managed that only via a hack, which wasn't compatable with batch mode. Only Command.Find, Command.Smudge, and Commange.Status use noMessages currently, and none except for Command.Find are impacted by this change. Fixes find --json --batch output
Diffstat (limited to 'Command.hs')
-rw-r--r--Command.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Command.hs b/Command.hs
index 387f7b8b5..e8c434b9b 100644
--- a/Command.hs
+++ b/Command.hs
@@ -66,8 +66,11 @@ withParams mkseek paramdesc = mkseek <$> cmdParams paramdesc
noCommit :: Command -> Command
noCommit c = c { cmdnocommit = True }
-{- Indicates that a command should not output anything other than what
- - it directly sends to stdout. (--json can override this). -}
+{- Indicates that a command should not output the usual messages when
+ - starting or stopping processing a file or other item. Unless --json mode
+ - is enabled, this also enables quiet output mode, so only things
+ - explicitly output by the command are shown and not progress messages
+ - etc. -}
noMessages :: Command -> Command
noMessages c = c { cmdnomessages = True }