doh't use "def" for command definitions, it conflicts with Data.Default.def

This commit is contained in:
Joey Hess 2014-10-14 14:20:10 -04:00
parent db9121ecee
commit 59f88558d5
86 changed files with 267 additions and 267 deletions

View file

@ -107,91 +107,91 @@ import System.Remote.Monitoring
cmds :: [Command] cmds :: [Command]
cmds = concat cmds = concat
[ Command.Add.def [ Command.Add.cmd
, Command.Get.def , Command.Get.cmd
, Command.Drop.def , Command.Drop.cmd
, Command.Move.def , Command.Move.cmd
, Command.Copy.def , Command.Copy.cmd
, Command.Unlock.def , Command.Unlock.cmd
, Command.Lock.def , Command.Lock.cmd
, Command.Sync.def , Command.Sync.cmd
, Command.Mirror.def , Command.Mirror.cmd
, Command.AddUrl.def , Command.AddUrl.cmd
#ifdef WITH_FEED #ifdef WITH_FEED
, Command.ImportFeed.def , Command.ImportFeed.cmd
#endif #endif
, Command.RmUrl.def , Command.RmUrl.cmd
, Command.Import.def , Command.Import.cmd
, Command.Init.def , Command.Init.cmd
, Command.Describe.def , Command.Describe.cmd
, Command.InitRemote.def , Command.InitRemote.cmd
, Command.EnableRemote.def , Command.EnableRemote.cmd
, Command.Reinject.def , Command.Reinject.cmd
, Command.Unannex.def , Command.Unannex.cmd
, Command.Uninit.def , Command.Uninit.cmd
, Command.Reinit.def , Command.Reinit.cmd
, Command.PreCommit.def , Command.PreCommit.cmd
, Command.NumCopies.def , Command.NumCopies.cmd
, Command.Trust.def , Command.Trust.cmd
, Command.Untrust.def , Command.Untrust.cmd
, Command.Semitrust.def , Command.Semitrust.cmd
, Command.Dead.def , Command.Dead.cmd
, Command.Group.def , Command.Group.cmd
, Command.Wanted.def , Command.Wanted.cmd
, Command.Schedule.def , Command.Schedule.cmd
, Command.Ungroup.def , Command.Ungroup.cmd
, Command.Vicfg.def , Command.Vicfg.cmd
, Command.LookupKey.def , Command.LookupKey.cmd
, Command.ExamineKey.def , Command.ExamineKey.cmd
, Command.FromKey.def , Command.FromKey.cmd
, Command.DropKey.def , Command.DropKey.cmd
, Command.TransferKey.def , Command.TransferKey.cmd
, Command.TransferKeys.def , Command.TransferKeys.cmd
, Command.ReKey.def , Command.ReKey.cmd
, Command.MetaData.def , Command.MetaData.cmd
, Command.View.def , Command.View.cmd
, Command.VAdd.def , Command.VAdd.cmd
, Command.VFilter.def , Command.VFilter.cmd
, Command.VPop.def , Command.VPop.cmd
, Command.VCycle.def , Command.VCycle.cmd
, Command.Fix.def , Command.Fix.cmd
, Command.Fsck.def , Command.Fsck.cmd
, Command.Repair.def , Command.Repair.cmd
, Command.Unused.def , Command.Unused.cmd
, Command.DropUnused.def , Command.DropUnused.cmd
, Command.AddUnused.def , Command.AddUnused.cmd
, Command.Find.def , Command.Find.cmd
, Command.FindRef.def , Command.FindRef.cmd
, Command.Whereis.def , Command.Whereis.cmd
, Command.List.def , Command.List.cmd
, Command.Log.def , Command.Log.cmd
, Command.Merge.def , Command.Merge.cmd
, Command.ResolveMerge.def , Command.ResolveMerge.cmd
, Command.Info.def , Command.Info.cmd
, Command.Status.def , Command.Status.cmd
, Command.Migrate.def , Command.Migrate.cmd
, Command.Map.def , Command.Map.cmd
, Command.Direct.def , Command.Direct.cmd
, Command.Indirect.def , Command.Indirect.cmd
, Command.Upgrade.def , Command.Upgrade.cmd
, Command.Forget.def , Command.Forget.cmd
, Command.Version.def , Command.Version.cmd
, Command.Help.def , Command.Help.cmd
#ifdef WITH_ASSISTANT #ifdef WITH_ASSISTANT
, Command.Watch.def , Command.Watch.cmd
, Command.Assistant.def , Command.Assistant.cmd
#ifdef WITH_WEBAPP #ifdef WITH_WEBAPP
, Command.WebApp.def , Command.WebApp.cmd
#endif #endif
#ifdef WITH_XMPP #ifdef WITH_XMPP
, Command.XMPPGit.def , Command.XMPPGit.cmd
#endif #endif
, Command.RemoteDaemon.def , Command.RemoteDaemon.cmd
#endif #endif
, Command.Test.def , Command.Test.cmd
#ifdef WITH_TESTSUITE #ifdef WITH_TESTSUITE
, Command.FuzzTest.def , Command.FuzzTest.cmd
, Command.TestRemote.def , Command.TestRemote.cmd
#endif #endif
] ]

View file

@ -34,19 +34,19 @@ import qualified Command.GCryptSetup
cmds_readonly :: [Command] cmds_readonly :: [Command]
cmds_readonly = concat cmds_readonly = concat
[ gitAnnexShellCheck Command.ConfigList.def [ gitAnnexShellCheck Command.ConfigList.cmd
, gitAnnexShellCheck Command.InAnnex.def , gitAnnexShellCheck Command.InAnnex.cmd
, gitAnnexShellCheck Command.SendKey.def , gitAnnexShellCheck Command.SendKey.cmd
, gitAnnexShellCheck Command.TransferInfo.def , gitAnnexShellCheck Command.TransferInfo.cmd
, gitAnnexShellCheck Command.NotifyChanges.def , gitAnnexShellCheck Command.NotifyChanges.cmd
] ]
cmds_notreadonly :: [Command] cmds_notreadonly :: [Command]
cmds_notreadonly = concat cmds_notreadonly = concat
[ gitAnnexShellCheck Command.RecvKey.def [ gitAnnexShellCheck Command.RecvKey.cmd
, gitAnnexShellCheck Command.DropKey.def , gitAnnexShellCheck Command.DropKey.cmd
, gitAnnexShellCheck Command.Commit.def , gitAnnexShellCheck Command.Commit.cmd
, Command.GCryptSetup.def , Command.GCryptSetup.cmd
] ]
cmds :: [Command] cmds :: [Command]

View file

@ -34,8 +34,8 @@ import Utility.Tmp
import Control.Exception (IOException) import Control.Exception (IOException)
def :: [Command] cmd :: [Command]
def = [notBareRepo $ withOptions [includeDotFilesOption] $ cmd = [notBareRepo $ withOptions [includeDotFilesOption] $
command "add" paramPaths seek SectionCommon command "add" paramPaths seek SectionCommon
"add files to annex"] "add files to annex"]

View file

@ -14,8 +14,8 @@ import qualified Command.Add
import Command.Unused (withUnusedMaps, UnusedMaps(..), startUnused) import Command.Unused (withUnusedMaps, UnusedMaps(..), startUnused)
import Types.Key import Types.Key
def :: [Command] cmd :: [Command]
def = [notDirect $ command "addunused" (paramRepeating paramNumRange) cmd = [notDirect $ command "addunused" (paramRepeating paramNumRange)
seek SectionMaintenance "add back unused files"] seek SectionMaintenance "add back unused files"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -32,8 +32,8 @@ import Annex.Quvi
import qualified Utility.Quvi as Quvi import qualified Utility.Quvi as Quvi
#endif #endif
def :: [Command] cmd :: [Command]
def = [notBareRepo $ withOptions [fileOption, pathdepthOption, relaxedOption] $ cmd = [notBareRepo $ withOptions [fileOption, pathdepthOption, relaxedOption] $
command "addurl" (paramRepeating paramUrl) seek command "addurl" (paramRepeating paramUrl) seek
SectionCommon "add urls to annex"] SectionCommon "add urls to annex"]

View file

@ -18,8 +18,8 @@ import Assistant.Install
import System.Environment import System.Environment
def :: [Command] cmd :: [Command]
def = [noRepo checkAutoStart $ dontCheck repoExists $ withOptions options $ cmd = [noRepo checkAutoStart $ dontCheck repoExists $ withOptions options $
notBareRepo $ command "assistant" paramNothing seek SectionCommon notBareRepo $ command "assistant" paramNothing seek SectionCommon
"automatically handle changes"] "automatically handle changes"]

View file

@ -12,8 +12,8 @@ import Command
import qualified Annex.Branch import qualified Annex.Branch
import qualified Git import qualified Git
def :: [Command] cmd :: [Command]
def = [command "commit" paramNothing seek cmd = [command "commit" paramNothing seek
SectionPlumbing "commits any staged changes to the git-annex branch"] SectionPlumbing "commits any staged changes to the git-annex branch"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -15,8 +15,8 @@ import qualified Annex.Branch
import qualified Git.Config import qualified Git.Config
import Remote.GCrypt (coreGCryptId) import Remote.GCrypt (coreGCryptId)
def :: [Command] cmd :: [Command]
def = [noCommit $ command "configlist" paramNothing seek cmd = [noCommit $ command "configlist" paramNothing seek
SectionPlumbing "outputs relevant git configuration"] SectionPlumbing "outputs relevant git configuration"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -14,8 +14,8 @@ import qualified Remote
import Annex.Wanted import Annex.Wanted
import Config.NumCopies import Config.NumCopies
def :: [Command] cmd :: [Command]
def = [withOptions Command.Move.moveOptions $ command "copy" paramPaths seek cmd = [withOptions Command.Move.moveOptions $ command "copy" paramPaths seek
SectionCommon "copy content of files to/from another repository"] SectionCommon "copy content of files to/from another repository"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -11,8 +11,8 @@ import Command
import Types.TrustLevel import Types.TrustLevel
import Command.Trust (trustCommand) import Command.Trust (trustCommand)
def :: [Command] cmd :: [Command]
def = [command "dead" (paramRepeating paramRemote) seek cmd = [command "dead" (paramRepeating paramRemote) seek
SectionSetup "hide a lost repository"] SectionSetup "hide a lost repository"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -12,8 +12,8 @@ import Command
import qualified Remote import qualified Remote
import Logs.UUID import Logs.UUID
def :: [Command] cmd :: [Command]
def = [command "describe" (paramPair paramRemote paramDesc) seek cmd = [command "describe" (paramPair paramRemote paramDesc) seek
SectionSetup "change description of a repository"] SectionSetup "change description of a repository"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -15,8 +15,8 @@ import qualified Git.Branch
import Config import Config
import Annex.Direct import Annex.Direct
def :: [Command] cmd :: [Command]
def = [notBareRepo $ noDaemonRunning $ cmd = [notBareRepo $ noDaemonRunning $
command "direct" paramNothing seek command "direct" paramNothing seek
SectionSetup "switch repository to direct mode"] SectionSetup "switch repository to direct mode"]

View file

@ -22,8 +22,8 @@ import Annex.Notification
import qualified Data.Set as S import qualified Data.Set as S
def :: [Command] cmd :: [Command]
def = [withOptions [dropFromOption] $ command "drop" paramPaths seek cmd = [withOptions [dropFromOption] $ command "drop" paramPaths seek
SectionCommon "indicate content of files not currently wanted"] SectionCommon "indicate content of files not currently wanted"]
dropFromOption :: Option dropFromOption :: Option

View file

@ -13,8 +13,8 @@ import qualified Annex
import Logs.Location import Logs.Location
import Annex.Content import Annex.Content
def :: [Command] cmd :: [Command]
def = [noCommit $ command "dropkey" (paramRepeating paramKey) seek cmd = [noCommit $ command "dropkey" (paramRepeating paramKey) seek
SectionPlumbing "drops annexed content for specified keys"] SectionPlumbing "drops annexed content for specified keys"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -16,8 +16,8 @@ import qualified Git
import Command.Unused (withUnusedMaps, UnusedMaps(..), startUnused) import Command.Unused (withUnusedMaps, UnusedMaps(..), startUnused)
import Config.NumCopies import Config.NumCopies
def :: [Command] cmd :: [Command]
def = [withOptions [Command.Drop.dropFromOption] $ cmd = [withOptions [Command.Drop.dropFromOption] $
command "dropunused" (paramRepeating paramNumRange) command "dropunused" (paramRepeating paramNumRange)
seek SectionMaintenance "drop unused file content"] seek SectionMaintenance "drop unused file content"]

View file

@ -15,8 +15,8 @@ import qualified Command.InitRemote as InitRemote
import qualified Data.Map as M import qualified Data.Map as M
def :: [Command] cmd :: [Command]
def = [command "enableremote" cmd = [command "enableremote"
(paramPair paramName $ paramOptional $ paramRepeating paramKeyValue) (paramPair paramName $ paramOptional $ paramRepeating paramKeyValue)
seek SectionSetup "enables use of an existing special remote"] seek SectionSetup "enables use of an existing special remote"]

View file

@ -13,8 +13,8 @@ import qualified Utility.Format
import Command.Find (formatOption, getFormat, showFormatted, keyVars) import Command.Find (formatOption, getFormat, showFormatted, keyVars)
import Types.Key import Types.Key
def :: [Command] cmd :: [Command]
def = [noCommit $ noMessages $ withOptions [formatOption, jsonOption] $ cmd = [noCommit $ noMessages $ withOptions [formatOption, jsonOption] $
command "examinekey" (paramRepeating paramKey) seek command "examinekey" (paramRepeating paramKey) seek
SectionPlumbing "prints information from a key"] SectionPlumbing "prints information from a key"]

View file

@ -18,8 +18,8 @@ import qualified Utility.Format
import Utility.DataUnits import Utility.DataUnits
import Types.Key import Types.Key
def :: [Command] cmd :: [Command]
def = [mkCommand $ command "find" paramPaths seek SectionQuery "lists available files"] cmd = [mkCommand $ command "find" paramPaths seek SectionQuery "lists available files"]
mkCommand :: Command -> Command mkCommand :: Command -> Command
mkCommand = noCommit . noMessages . withOptions [formatOption, print0Option, jsonOption] mkCommand = noCommit . noMessages . withOptions [formatOption, print0Option, jsonOption]

View file

@ -10,8 +10,8 @@ module Command.FindRef where
import Command import Command
import qualified Command.Find as Find import qualified Command.Find as Find
def :: [Command] cmd :: [Command]
def = [Find.mkCommand $ command "findref" paramRef seek SectionPlumbing cmd = [Find.mkCommand $ command "findref" paramRef seek SectionPlumbing
"lists files in a git ref"] "lists files in a git ref"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -18,8 +18,8 @@ import Utility.Touch
#endif #endif
#endif #endif
def :: [Command] cmd :: [Command]
def = [notDirect $ noCommit $ command "fix" paramPaths seek cmd = [notDirect $ noCommit $ command "fix" paramPaths seek
SectionMaintenance "fix up symlinks to point to annexed content"] SectionMaintenance "fix up symlinks to point to annexed content"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -15,8 +15,8 @@ import qualified Annex
import Data.Time.Clock.POSIX import Data.Time.Clock.POSIX
def :: [Command] cmd :: [Command]
def = [withOptions forgetOptions $ command "forget" paramNothing seek cmd = [withOptions forgetOptions $ command "forget" paramNothing seek
SectionMaintenance "prune git-annex branch history"] SectionMaintenance "prune git-annex branch history"]
forgetOptions :: [Option] forgetOptions :: [Option]

View file

@ -13,8 +13,8 @@ import qualified Annex.Queue
import Annex.Content import Annex.Content
import Types.Key import Types.Key
def :: [Command] cmd :: [Command]
def = [notDirect $ notBareRepo $ cmd = [notDirect $ notBareRepo $
command "fromkey" (paramPair paramKey paramPath) seek command "fromkey" (paramPair paramKey paramPath) seek
SectionPlumbing "adds a file using a specific key"] SectionPlumbing "adds a file using a specific key"]

View file

@ -39,8 +39,8 @@ import Data.Time
import System.Posix.Types (EpochTime) import System.Posix.Types (EpochTime)
import System.Locale import System.Locale
def :: [Command] cmd :: [Command]
def = [withOptions fsckOptions $ command "fsck" paramPaths seek cmd = [withOptions fsckOptions $ command "fsck" paramPaths seek
SectionMaintenance "check for problems"] SectionMaintenance "check for problems"]
fsckFromOption :: Option fsckFromOption :: Option

View file

@ -20,8 +20,8 @@ import System.Random (getStdRandom, random, randomR)
import Test.QuickCheck import Test.QuickCheck
import Control.Concurrent import Control.Concurrent
def :: [Command] cmd :: [Command]
def = [ notBareRepo $ command "fuzztest" paramNothing seek SectionTesting cmd = [ notBareRepo $ command "fuzztest" paramNothing seek SectionTesting
"generates fuzz test files"] "generates fuzz test files"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -13,8 +13,8 @@ import Annex.UUID
import qualified Remote.GCrypt import qualified Remote.GCrypt
import qualified Git import qualified Git
def :: [Command] cmd :: [Command]
def = [dontCheck repoExists $ noCommit $ cmd = [dontCheck repoExists $ noCommit $
command "gcryptsetup" paramValue seek command "gcryptsetup" paramValue seek
SectionPlumbing "sets up gcrypt repository"] SectionPlumbing "sets up gcrypt repository"]

View file

@ -16,8 +16,8 @@ import Config.NumCopies
import Annex.Wanted import Annex.Wanted
import qualified Command.Move import qualified Command.Move
def :: [Command] cmd :: [Command]
def = [withOptions getOptions $ command "get" paramPaths seek cmd = [withOptions getOptions $ command "get" paramPaths seek
SectionCommon "make content of annexed files available"] SectionCommon "make content of annexed files available"]
getOptions :: [Option] getOptions :: [Option]

View file

@ -15,8 +15,8 @@ import Types.Group
import qualified Data.Set as S import qualified Data.Set as S
def :: [Command] cmd :: [Command]
def = [command "group" (paramPair paramRemote paramDesc) seek cmd = [command "group" (paramPair paramRemote paramDesc) seek
SectionSetup "add a repository to a group"] SectionSetup "add a repository to a group"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -21,8 +21,8 @@ import qualified Command.Fsck
import System.Console.GetOpt import System.Console.GetOpt
def :: [Command] cmd :: [Command]
def = [noCommit $ noRepo startNoRepo $ dontCheck repoExists $ cmd = [noCommit $ noRepo startNoRepo $ dontCheck repoExists $
command "help" paramNothing seek SectionQuery "display help"] command "help" paramNothing seek SectionQuery "display help"]
seek :: CommandSeek seek :: CommandSeek
@ -47,15 +47,15 @@ showGeneralHelp :: IO ()
showGeneralHelp = putStrLn $ unlines showGeneralHelp = putStrLn $ unlines
[ "The most frequently used git-annex commands are:" [ "The most frequently used git-annex commands are:"
, unlines $ map cmdline $ concat , unlines $ map cmdline $ concat
[ Command.Init.def [ Command.Init.cmd
, Command.Add.def , Command.Add.cmd
, Command.Drop.def , Command.Drop.cmd
, Command.Get.def , Command.Get.cmd
, Command.Move.def , Command.Move.cmd
, Command.Copy.def , Command.Copy.cmd
, Command.Sync.def , Command.Sync.cmd
, Command.Whereis.def , Command.Whereis.cmd
, Command.Fsck.def , Command.Fsck.cmd
] ]
, "Run 'git-annex' for a complete command list." , "Run 'git-annex' for a complete command list."
, "Run 'git-annex command --help' for help on a specific command." , "Run 'git-annex command --help' for help on a specific command."

View file

@ -16,8 +16,8 @@ import Backend
import Remote import Remote
import Types.KeySource import Types.KeySource
def :: [Command] cmd :: [Command]
def = [withOptions opts $ notBareRepo $ command "import" paramPaths seek cmd = [withOptions opts $ notBareRepo $ command "import" paramPaths seek
SectionCommon "move and add files from outside git working copy"] SectionCommon "move and add files from outside git working copy"]
opts :: [Option] opts :: [Option]

View file

@ -37,8 +37,8 @@ import Types.MetaData
import Logs.MetaData import Logs.MetaData
import Annex.MetaData import Annex.MetaData
def :: [Command] cmd :: [Command]
def = [notBareRepo $ withOptions [templateOption, relaxedOption] $ cmd = [notBareRepo $ withOptions [templateOption, relaxedOption] $
command "importfeed" (paramRepeating paramUrl) seek command "importfeed" (paramRepeating paramUrl) seek
SectionCommon "import files from podcast feeds"] SectionCommon "import files from podcast feeds"]

View file

@ -11,8 +11,8 @@ import Common.Annex
import Command import Command
import Annex.Content import Annex.Content
def :: [Command] cmd :: [Command]
def = [noCommit $ command "inannex" (paramRepeating paramKey) seek cmd = [noCommit $ command "inannex" (paramRepeating paramKey) seek
SectionPlumbing "checks if keys are present in the annex"] SectionPlumbing "checks if keys are present in the annex"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -22,8 +22,8 @@ import Annex.CatFile
import Annex.Init import Annex.Init
import qualified Command.Add import qualified Command.Add
def :: [Command] cmd :: [Command]
def = [notBareRepo $ noDaemonRunning $ cmd = [notBareRepo $ noDaemonRunning $
command "indirect" paramNothing seek command "indirect" paramNothing seek
SectionSetup "switch repository to indirect mode"] SectionSetup "switch repository to indirect mode"]

View file

@ -69,8 +69,8 @@ data StatInfo = StatInfo
-- a state monad for running Stats in -- a state monad for running Stats in
type StatState = StateT StatInfo Annex type StatState = StateT StatInfo Annex
def :: [Command] cmd :: [Command]
def = [noCommit $ dontCheck repoExists $ withOptions [jsonOption] $ cmd = [noCommit $ dontCheck repoExists $ withOptions [jsonOption] $
command "info" paramPaths seek SectionQuery command "info" paramPaths seek SectionQuery
"shows general information about the annex"] "shows general information about the annex"]

View file

@ -11,8 +11,8 @@ import Common.Annex
import Command import Command
import Annex.Init import Annex.Init
def :: [Command] cmd :: [Command]
def = [dontCheck repoExists $ cmd = [dontCheck repoExists $
command "init" paramDesc seek SectionSetup "initialize git-annex"] command "init" paramDesc seek SectionSetup "initialize git-annex"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -19,8 +19,8 @@ import Logs.Trust
import Data.Ord import Data.Ord
def :: [Command] cmd :: [Command]
def = [command "initremote" cmd = [command "initremote"
(paramPair paramName $ paramOptional $ paramRepeating paramKeyValue) (paramPair paramName $ paramOptional $ paramRepeating paramKeyValue)
seek SectionSetup "creates a special (non-git) remote"] seek SectionSetup "creates a special (non-git) remote"]

View file

@ -23,8 +23,8 @@ import Annex.UUID
import qualified Annex import qualified Annex
import Git.Types (RemoteName) import Git.Types (RemoteName)
def :: [Command] cmd :: [Command]
def = [noCommit $ withOptions [allrepos] $ command "list" paramPaths seek cmd = [noCommit $ withOptions [allrepos] $ command "list" paramPaths seek
SectionQuery "show which remotes contain files"] SectionQuery "show which remotes contain files"]
allrepos :: Option allrepos :: Option

View file

@ -12,8 +12,8 @@ import Command
import qualified Annex.Queue import qualified Annex.Queue
import qualified Annex import qualified Annex
def :: [Command] cmd :: [Command]
def = [notDirect $ command "lock" paramPaths seek SectionCommon cmd = [notDirect $ command "lock" paramPaths seek SectionCommon
"undo unlock command"] "undo unlock command"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -34,8 +34,8 @@ data RefChange = RefChange
type Outputter = Bool -> POSIXTime -> [UUID] -> Annex () type Outputter = Bool -> POSIXTime -> [UUID] -> Annex ()
def :: [Command] cmd :: [Command]
def = [withOptions options $ cmd = [withOptions options $
command "log" paramPaths seek SectionQuery "shows location log"] command "log" paramPaths seek SectionQuery "shows location log"]
options :: [Option] options :: [Option]

View file

@ -12,8 +12,8 @@ import Command
import Annex.CatFile import Annex.CatFile
import Types.Key import Types.Key
def :: [Command] cmd :: [Command]
def = [notBareRepo $ noCommit $ noMessages $ cmd = [notBareRepo $ noCommit $ noMessages $
command "lookupkey" (paramRepeating paramFile) seek command "lookupkey" (paramRepeating paramFile) seek
SectionPlumbing "looks up key used for file"] SectionPlumbing "looks up key used for file"]

View file

@ -25,8 +25,8 @@ import qualified Utility.Dot as Dot
-- a link from the first repository to the second (its remote) -- a link from the first repository to the second (its remote)
data Link = Link Git.Repo Git.Repo data Link = Link Git.Repo Git.Repo
def :: [Command] cmd :: [Command]
def = [dontCheck repoExists $ cmd = [dontCheck repoExists $
command "map" paramNothing seek SectionQuery command "map" paramNothing seek SectionQuery
"generate map of repositories"] "generate map of repositories"]

View file

@ -13,8 +13,8 @@ import qualified Annex.Branch
import qualified Git.Branch import qualified Git.Branch
import Command.Sync (prepMerge, mergeLocal) import Command.Sync (prepMerge, mergeLocal)
def :: [Command] cmd :: [Command]
def = [command "merge" paramNothing seek SectionMaintenance cmd = [command "merge" paramNothing seek SectionMaintenance
"automatically merge changes from remotes"] "automatically merge changes from remotes"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -16,8 +16,8 @@ import Logs.MetaData
import qualified Data.Set as S import qualified Data.Set as S
import Data.Time.Clock.POSIX import Data.Time.Clock.POSIX
def :: [Command] cmd :: [Command]
def = [withOptions metaDataOptions $ cmd = [withOptions metaDataOptions $
command "metadata" paramPaths seek command "metadata" paramPaths seek
SectionMetaData "sets metadata of a file"] SectionMetaData "sets metadata of a file"]

View file

@ -17,8 +17,8 @@ import Annex.Content
import qualified Command.ReKey import qualified Command.ReKey
import qualified Command.Fsck import qualified Command.Fsck
def :: [Command] cmd :: [Command]
def = [notDirect $ cmd = [notDirect $
command "migrate" paramPaths seek command "migrate" paramPaths seek
SectionUtility "switch data to different backend"] SectionUtility "switch data to different backend"]

View file

@ -17,8 +17,8 @@ import Annex.Content
import qualified Annex import qualified Annex
import Config.NumCopies import Config.NumCopies
def :: [Command] cmd :: [Command]
def = [withOptions (fromToOptions ++ keyOptions) $ cmd = [withOptions (fromToOptions ++ keyOptions) $
command "mirror" paramPaths seek command "mirror" paramPaths seek
SectionCommon "mirror content of files to/from another repository"] SectionCommon "mirror content of files to/from another repository"]

View file

@ -17,8 +17,8 @@ import Annex.UUID
import Annex.Transfer import Annex.Transfer
import Logs.Presence import Logs.Presence
def :: [Command] cmd :: [Command]
def = [withOptions moveOptions $ command "move" paramPaths seek cmd = [withOptions moveOptions $ command "move" paramPaths seek
SectionCommon "move content of files to/from another repository"] SectionCommon "move content of files to/from another repository"]
moveOptions :: [Option] moveOptions :: [Option]

View file

@ -19,8 +19,8 @@ import Control.Concurrent
import Control.Concurrent.Async import Control.Concurrent.Async
import Control.Concurrent.STM import Control.Concurrent.STM
def :: [Command] cmd :: [Command]
def = [noCommit $ command "notifychanges" paramNothing seek SectionPlumbing cmd = [noCommit $ command "notifychanges" paramNothing seek SectionPlumbing
"sends notification when git refs are changed"] "sends notification when git refs are changed"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -13,8 +13,8 @@ import Command
import Config.NumCopies import Config.NumCopies
import Types.Messages import Types.Messages
def :: [Command] cmd :: [Command]
def = [command "numcopies" paramNumber seek cmd = [command "numcopies" paramNumber seek
SectionSetup "configure desired number of copies"] SectionSetup "configure desired number of copies"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -26,8 +26,8 @@ import Types.MetaData
import qualified Data.Set as S import qualified Data.Set as S
def :: [Command] cmd :: [Command]
def = [command "pre-commit" paramPaths seek SectionPlumbing cmd = [command "pre-commit" paramPaths seek SectionPlumbing
"run by git pre-commit hook"] "run by git pre-commit hook"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -17,8 +17,8 @@ import Logs.Web
import Logs.Location import Logs.Location
import Utility.CopyFile import Utility.CopyFile
def :: [Command] cmd :: [Command]
def = [notDirect $ command "rekey" cmd = [notDirect $ command "rekey"
(paramOptional $ paramRepeating $ paramPair paramPath paramKey) (paramOptional $ paramRepeating $ paramPair paramPath paramKey)
seek SectionPlumbing "change keys used for files"] seek SectionPlumbing "change keys used for files"]

View file

@ -20,8 +20,8 @@ import qualified Types.Key
import qualified Types.Backend import qualified Types.Backend
import qualified Backend import qualified Backend
def :: [Command] cmd :: [Command]
def = [noCommit $ command "recvkey" paramKey seek cmd = [noCommit $ command "recvkey" paramKey seek
SectionPlumbing "runs rsync in server mode to receive content"] SectionPlumbing "runs rsync in server mode to receive content"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -14,8 +14,8 @@ import Annex.UUID
import Types.UUID import Types.UUID
import qualified Remote import qualified Remote
def :: [Command] cmd :: [Command]
def = [dontCheck repoExists $ cmd = [dontCheck repoExists $
command "reinit" (paramUUID ++ " or " ++ paramDesc) seek SectionUtility ""] command "reinit" (paramUUID ++ " or " ++ paramDesc) seek SectionUtility ""]
seek :: CommandSeek seek :: CommandSeek

View file

@ -14,8 +14,8 @@ import Annex.Content
import qualified Command.Fsck import qualified Command.Fsck
import qualified Backend import qualified Backend
def :: [Command] cmd :: [Command]
def = [command "reinject" (paramPair "SRC" "DEST") seek cmd = [command "reinject" (paramPair "SRC" "DEST") seek
SectionUtility "sets content of annexed file"] SectionUtility "sets content of annexed file"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -11,8 +11,8 @@ import Common.Annex
import Command import Command
import RemoteDaemon.Core import RemoteDaemon.Core
def :: [Command] cmd :: [Command]
def = [noCommit $ command "remotedaemon" paramNothing seek SectionPlumbing cmd = [noCommit $ command "remotedaemon" paramNothing seek SectionPlumbing
"detects when remotes have changed, and fetches from them"] "detects when remotes have changed, and fetches from them"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -16,8 +16,8 @@ import qualified Git.Ref
import Git.Types import Git.Types
import Annex.Version import Annex.Version
def :: [Command] cmd :: [Command]
def = [noCommit $ dontCheck repoExists $ cmd = [noCommit $ dontCheck repoExists $
command "repair" paramNothing seek SectionMaintenance "recover broken git repository"] command "repair" paramNothing seek SectionMaintenance "recover broken git repository"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -14,8 +14,8 @@ import Git.Sha
import qualified Git.Branch import qualified Git.Branch
import Annex.AutoMerge import Annex.AutoMerge
def :: [Command] cmd :: [Command]
def = [command "resolvemerge" paramNothing seek SectionPlumbing cmd = [command "resolvemerge" paramNothing seek SectionPlumbing
"resolve merge conflicts"] "resolve merge conflicts"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -11,8 +11,8 @@ import Common.Annex
import Command import Command
import Logs.Web import Logs.Web
def :: [Command] cmd :: [Command]
def = [notBareRepo $ cmd = [notBareRepo $
command "rmurl" (paramPair paramFile paramUrl) seek command "rmurl" (paramPair paramFile paramUrl) seek
SectionCommon "record file is not available at url"] SectionCommon "record file is not available at url"]

View file

@ -17,8 +17,8 @@ import Types.Messages
import qualified Data.Set as S import qualified Data.Set as S
def :: [Command] cmd :: [Command]
def = [command "schedule" (paramPair paramRemote (paramOptional paramExpression)) seek cmd = [command "schedule" (paramPair paramRemote (paramOptional paramExpression)) seek
SectionSetup "get or set scheduled jobs"] SectionSetup "get or set scheduled jobs"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -11,8 +11,8 @@ import Command
import Types.TrustLevel import Types.TrustLevel
import Command.Trust (trustCommand) import Command.Trust (trustCommand)
def :: [Command] cmd :: [Command]
def = [command "semitrust" (paramRepeating paramRemote) seek cmd = [command "semitrust" (paramRepeating paramRemote) seek
SectionSetup "return repository to default trust level"] SectionSetup "return repository to default trust level"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -16,8 +16,8 @@ import Annex.Transfer
import qualified CmdLine.GitAnnexShell.Fields as Fields import qualified CmdLine.GitAnnexShell.Fields as Fields
import Utility.Metered import Utility.Metered
def :: [Command] cmd :: [Command]
def = [noCommit $ command "sendkey" paramKey seek cmd = [noCommit $ command "sendkey" paramKey seek
SectionPlumbing "runs rsync in server mode to send content"] SectionPlumbing "runs rsync in server mode to send content"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -16,8 +16,8 @@ import qualified Git.LsFiles as LsFiles
import qualified Git.Ref import qualified Git.Ref
import qualified Git import qualified Git
def :: [Command] cmd :: [Command]
def = [notBareRepo $ noCommit $ noMessages $ withOptions [jsonOption] $ cmd = [notBareRepo $ noCommit $ noMessages $ withOptions [jsonOption] $
command "status" paramPaths seek SectionCommon command "status" paramPaths seek SectionCommon
"show the working tree status"] "show the working tree status"]

View file

@ -35,8 +35,8 @@ import Annex.Ssh
import Control.Concurrent.MVar import Control.Concurrent.MVar
def :: [Command] cmd :: [Command]
def = [withOptions syncOptions $ cmd = [withOptions syncOptions $
command "sync" (paramOptional (paramRepeating paramRemote)) command "sync" (paramOptional (paramRepeating paramRemote))
seek SectionCommon "synchronize local repository with remotes"] seek SectionCommon "synchronize local repository with remotes"]

View file

@ -11,8 +11,8 @@ import Common
import Command import Command
import Messages import Messages
def :: [Command] cmd :: [Command]
def = [ noRepo startIO $ dontCheck repoExists $ cmd = [ noRepo startIO $ dontCheck repoExists $
command "test" paramNothing seek SectionTesting command "test" paramNothing seek SectionTesting
"run built-in test suite"] "run built-in test suite"]

View file

@ -36,8 +36,8 @@ import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as L import qualified Data.ByteString.Lazy as L
import qualified Data.Map as M import qualified Data.Map as M
def :: [Command] cmd :: [Command]
def = [ withOptions [sizeOption] $ cmd = [ withOptions [sizeOption] $
command "testremote" paramRemote seek SectionTesting command "testremote" paramRemote seek SectionTesting
"test transfers to/from a remote"] "test transfers to/from a remote"]

View file

@ -15,8 +15,8 @@ import Types.Key
import qualified CmdLine.GitAnnexShell.Fields as Fields import qualified CmdLine.GitAnnexShell.Fields as Fields
import Utility.Metered import Utility.Metered
def :: [Command] cmd :: [Command]
def = [noCommit $ command "transferinfo" paramKey seek SectionPlumbing cmd = [noCommit $ command "transferinfo" paramKey seek SectionPlumbing
"updates sender on number of bytes of content received"] "updates sender on number of bytes of content received"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -15,8 +15,8 @@ import Annex.Transfer
import qualified Remote import qualified Remote
import Types.Remote import Types.Remote
def :: [Command] cmd :: [Command]
def = [withOptions transferKeyOptions $ cmd = [withOptions transferKeyOptions $
noCommit $ command "transferkey" paramKey seek SectionPlumbing noCommit $ command "transferkey" paramKey seek SectionPlumbing
"transfers a key from or to a remote"] "transfers a key from or to a remote"]

View file

@ -21,8 +21,8 @@ import Git.Types (RemoteName)
data TransferRequest = TransferRequest Direction Remote Key AssociatedFile data TransferRequest = TransferRequest Direction Remote Key AssociatedFile
def :: [Command] cmd :: [Command]
def = [command "transferkeys" paramNothing seek cmd = [command "transferkeys" paramNothing seek
SectionPlumbing "transfers keys"] SectionPlumbing "transfers keys"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -16,8 +16,8 @@ import Logs.Group
import qualified Data.Set as S import qualified Data.Set as S
def :: [Command] cmd :: [Command]
def = [command "trust" (paramRepeating paramRemote) seek cmd = [command "trust" (paramRepeating paramRemote) seek
SectionSetup "trust a repository"] SectionSetup "trust a repository"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -22,8 +22,8 @@ import qualified Git.DiffTree as DiffTree
import Utility.CopyFile import Utility.CopyFile
import Command.PreCommit (lockPreCommitHook) import Command.PreCommit (lockPreCommitHook)
def :: [Command] cmd :: [Command]
def = [command "unannex" paramPaths seek SectionUtility cmd = [command "unannex" paramPaths seek SectionUtility
"undo accidential add command"] "undo accidential add command"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -15,8 +15,8 @@ import Types.Group
import qualified Data.Set as S import qualified Data.Set as S
def :: [Command] cmd :: [Command]
def = [command "ungroup" (paramPair paramRemote paramDesc) seek cmd = [command "ungroup" (paramPair paramRemote paramDesc) seek
SectionSetup "remove a repository from a group"] SectionSetup "remove a repository from a group"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -21,8 +21,8 @@ import Utility.FileMode
import System.IO.HVFS import System.IO.HVFS
import System.IO.HVFS.Utils import System.IO.HVFS.Utils
def :: [Command] cmd :: [Command]
def = [addCheck check $ command "uninit" paramPaths seek cmd = [addCheck check $ command "uninit" paramPaths seek
SectionUtility "de-initialize git-annex and clean out repository"] SectionUtility "de-initialize git-annex and clean out repository"]
check :: Annex () check :: Annex ()

View file

@ -12,8 +12,8 @@ import Command
import Annex.Content import Annex.Content
import Utility.CopyFile import Utility.CopyFile
def :: [Command] cmd :: [Command]
def = cmd =
[ c "unlock" "unlock files for modification" [ c "unlock" "unlock files for modification"
, c "edit" "same as unlock" , c "edit" "same as unlock"
] ]

View file

@ -11,8 +11,8 @@ import Command
import Types.TrustLevel import Types.TrustLevel
import Command.Trust (trustCommand) import Command.Trust (trustCommand)
def :: [Command] cmd :: [Command]
def = [command "untrust" (paramRepeating paramRemote) seek cmd = [command "untrust" (paramRepeating paramRemote) seek
SectionSetup "do not trust a repository"] SectionSetup "do not trust a repository"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -35,8 +35,8 @@ import Git.FilePath
import Logs.View (is_branchView) import Logs.View (is_branchView)
import Utility.Bloom import Utility.Bloom
def :: [Command] cmd :: [Command]
def = [withOptions [unusedFromOption] $ command "unused" paramNothing seek cmd = [withOptions [unusedFromOption] $ command "unused" paramNothing seek
SectionMaintenance "look for unused file content"] SectionMaintenance "look for unused file content"]
unusedFromOption :: Option unusedFromOption :: Option

View file

@ -11,8 +11,8 @@ import Common.Annex
import Command import Command
import Upgrade import Upgrade
def :: [Command] cmd :: [Command]
def = [dontCheck repoExists $ -- because an old version may not seem to exist cmd = [dontCheck repoExists $ -- because an old version may not seem to exist
command "upgrade" paramNothing seek command "upgrade" paramNothing seek
SectionMaintenance "upgrade repository layout"] SectionMaintenance "upgrade repository layout"]

View file

@ -12,8 +12,8 @@ import Command
import Annex.View import Annex.View
import Command.View (checkoutViewBranch) import Command.View (checkoutViewBranch)
def :: [Command] cmd :: [Command]
def = [notBareRepo $ notDirect $ command "vadd" (paramRepeating "FIELD=GLOB") cmd = [notBareRepo $ notDirect $ command "vadd" (paramRepeating "FIELD=GLOB")
seek SectionMetaData "add subdirs to current view"] seek SectionMetaData "add subdirs to current view"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -14,8 +14,8 @@ import Types.View
import Logs.View import Logs.View
import Command.View (checkoutViewBranch) import Command.View (checkoutViewBranch)
def :: [Command] cmd :: [Command]
def = [notBareRepo $ notDirect $ cmd = [notBareRepo $ notDirect $
command "vcycle" paramNothing seek SectionUtility command "vcycle" paramNothing seek SectionUtility
"switch view to next layout"] "switch view to next layout"]

View file

@ -12,8 +12,8 @@ import Command
import Annex.View import Annex.View
import Command.View (paramView, checkoutViewBranch) import Command.View (paramView, checkoutViewBranch)
def :: [Command] cmd :: [Command]
def = [notBareRepo $ notDirect $ cmd = [notBareRepo $ notDirect $
command "vfilter" paramView seek SectionMetaData "filter current view"] command "vfilter" paramView seek SectionMetaData "filter current view"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -16,8 +16,8 @@ import Types.View
import Logs.View import Logs.View
import Command.View (checkoutViewBranch) import Command.View (checkoutViewBranch)
def :: [Command] cmd :: [Command]
def = [notBareRepo $ notDirect $ cmd = [notBareRepo $ notDirect $
command "vpop" (paramOptional paramNumber) seek SectionMetaData command "vpop" (paramOptional paramNumber) seek SectionMetaData
"switch back to previous view"] "switch back to previous view"]

View file

@ -17,8 +17,8 @@ import qualified Types.Remote as R
import qualified Remote import qualified Remote
import qualified Backend import qualified Backend
def :: [Command] cmd :: [Command]
def = [noCommit $ noRepo startNoRepo $ dontCheck repoExists $ cmd = [noCommit $ noRepo startNoRepo $ dontCheck repoExists $
command "version" paramNothing seek SectionQuery "show version info"] command "version" paramNothing seek SectionQuery "show version info"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -29,8 +29,8 @@ import Types.StandardGroups
import Types.ScheduledActivity import Types.ScheduledActivity
import Remote import Remote
def :: [Command] cmd :: [Command]
def = [command "vicfg" paramNothing seek cmd = [command "vicfg" paramNothing seek
SectionSetup "edit git-annex's configuration"] SectionSetup "edit git-annex's configuration"]
seek :: CommandSeek seek :: CommandSeek
@ -101,7 +101,7 @@ defCfg curcfg = Cfg
} }
where where
mapdef :: forall k v. Default v => M.Map k v -> M.Map k v mapdef :: forall k v. Default v => M.Map k v -> M.Map k v
mapdef = M.map (const Data.Default.def) mapdef = M.map (const def)
diffCfg :: Cfg -> Cfg -> Cfg diffCfg :: Cfg -> Cfg -> Cfg
diffCfg curcfg newcfg = Cfg diffCfg curcfg newcfg = Cfg
@ -142,7 +142,7 @@ genCfg cfg descs = unlines $ intercalate [""]
, com "(Valid trust levels: " ++ trustlevels ++ ")" , com "(Valid trust levels: " ++ trustlevels ++ ")"
] ]
(\(t, u) -> line "trust" u $ showTrustLevel t) (\(t, u) -> line "trust" u $ showTrustLevel t)
(\u -> lcom $ line "trust" u $ showTrustLevel Data.Default.def) (\u -> lcom $ line "trust" u $ showTrustLevel def)
where where
trustlevels = unwords $ map showTrustLevel [Trusted .. DeadTrusted] trustlevels = unwords $ map showTrustLevel [Trusted .. DeadTrusted]

View file

@ -17,8 +17,8 @@ import Types.View
import Annex.View import Annex.View
import Logs.View import Logs.View
def :: [Command] cmd :: [Command]
def = [notBareRepo $ notDirect $ cmd = [notBareRepo $ notDirect $
command "view" paramView seek SectionMetaData "enter a view branch"] command "view" paramView seek SectionMetaData "enter a view branch"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -16,8 +16,8 @@ import Types.Messages
import qualified Data.Map as M import qualified Data.Map as M
def :: [Command] cmd :: [Command]
def = [command "wanted" (paramPair paramRemote (paramOptional paramExpression)) seek cmd = [command "wanted" (paramPair paramRemote (paramOptional paramExpression)) seek
SectionSetup "get or set preferred content expression"] SectionSetup "get or set preferred content expression"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -12,8 +12,8 @@ import Assistant
import Command import Command
import Utility.HumanTime import Utility.HumanTime
def :: [Command] cmd :: [Command]
def = [notBareRepo $ withOptions [foregroundOption, stopOption] $ cmd = [notBareRepo $ withOptions [foregroundOption, stopOption] $
command "watch" paramNothing seek SectionCommon "watch for changes"] command "watch" paramNothing seek SectionCommon "watch for changes"]
seek :: CommandSeek seek :: CommandSeek

View file

@ -37,8 +37,8 @@ import Control.Concurrent.STM
import Network.Socket (HostName) import Network.Socket (HostName)
import System.Environment (getArgs) import System.Environment (getArgs)
def :: [Command] cmd :: [Command]
def = [ withOptions [listenOption] $ cmd = [ withOptions [listenOption] $
noCommit $ noRepo startNoRepo $ dontCheck repoExists $ notBareRepo $ noCommit $ noRepo startNoRepo $ dontCheck repoExists $ notBareRepo $
command "webapp" paramNothing seek SectionCommon "launch webapp"] command "webapp" paramNothing seek SectionCommon "launch webapp"]

View file

@ -14,8 +14,8 @@ import Command
import Remote import Remote
import Logs.Trust import Logs.Trust
def :: [Command] cmd :: [Command]
def = [noCommit $ withOptions (jsonOption : keyOptions) $ cmd = [noCommit $ withOptions (jsonOption : keyOptions) $
command "whereis" paramPaths seek SectionQuery command "whereis" paramPaths seek SectionQuery
"lists repositories that have file content"] "lists repositories that have file content"]

View file

@ -11,8 +11,8 @@ import Common.Annex
import Command import Command
import Assistant.XMPP.Git import Assistant.XMPP.Git
def :: [Command] cmd :: [Command]
def = [noCommit $ noRepo startNoRepo $ dontCheck repoExists $ cmd = [noCommit $ noRepo startNoRepo $ dontCheck repoExists $
command "xmppgit" paramNothing seek command "xmppgit" paramNothing seek
SectionPlumbing "git to XMPP relay"] SectionPlumbing "git to XMPP relay"]
@ -37,9 +37,9 @@ gitRemoteHelper = do
respond [] respond []
where where
expect s = do expect s = do
cmd <- getLine gitcmd <- getLine
unless (cmd == s) $ unless (gitcmd == s) $
error $ "git-remote-helpers protocol error: expected: " ++ s ++ ", but got: " ++ cmd error $ "git-remote-helpers protocol error: expected: " ++ s ++ ", but got: " ++ gitcmd
respond l = do respond l = do
mapM_ putStrLn l mapM_ putStrLn l
putStrLn "" putStrLn ""