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:
parent
baa2ab2c7d
commit
d0651bb567
10 changed files with 51 additions and 15 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue