summaryrefslogtreecommitdiff
path: root/Command/Config.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-02-16 13:24:16 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-02-16 13:24:35 -0400
commit34bcff4cba4a8f866110309ae00bcd4a8deb7551 (patch)
treea187a962bb859d8a77ef59c459e5cc2ace0dd795 /Command/Config.hs
parentb65b8fe7f1b63403e8b1fd1e149e0adb5b00277d (diff)
make query commands not output extraneous messages
config group groupwanted numcopies schedule wanted required: Avoid displaying extraneous messages about repository auto-init, git-annex branch merging, etc, when being used to get information.
Diffstat (limited to 'Command/Config.hs')
-rw-r--r--Command/Config.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Command/Config.hs b/Command/Config.hs
index 690c8d288..c9b6a7b0b 100644
--- a/Command/Config.hs
+++ b/Command/Config.hs
@@ -11,7 +11,8 @@ import Command
import Logs.Config
cmd :: Command
-cmd = command "config" SectionSetup "configuration stored in git-annex branch"
+cmd = noMessages $ command "config" SectionSetup
+ "configuration stored in git-annex branch"
paramNothing (seek <$$> optParser)
data Action
@@ -47,11 +48,13 @@ optParser _ = setconfig <|> getconfig <|> unsetconfig
seek :: Action -> CommandSeek
seek (SetConfig name val) = commandAction $ do
+ allowMessages
showStart name val
next $ next $ do
setGlobalConfig name val
return True
seek (UnsetConfig name) = commandAction $ do
+ allowMessages
showStart name "unset"
next $ next $ do
unsetGlobalConfig name