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.
This commit is contained in:
Joey Hess 2017-02-16 13:24:16 -04:00
parent baa2ab2c7d
commit d0651bb567
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
10 changed files with 51 additions and 15 deletions

View file

@ -12,7 +12,7 @@ import Logs.PreferredContent
import Command.Wanted (performGet, performSet)
cmd :: Command
cmd = command "groupwanted" SectionSetup
cmd = noMessages $ command "groupwanted" SectionSetup
"get or set groupwanted expression"
(paramPair paramGroup (paramOptional paramExpression))
(withParams seek)
@ -23,6 +23,7 @@ seek = withWords start
start :: [String] -> CommandStart
start (g:[]) = next $ performGet groupPreferredContentMapRaw g
start (g:expr:[]) = do
allowMessages
showStart "groupwanted" g
next $ performSet groupPreferredContentSet expr g
start _ = giveup "Specify a group."