block all commands that don't work in direct mode

I left status working in direct mode, although it doesn't show correct
stats for known annex keys.
This commit is contained in:
Joey Hess 2012-12-29 14:28:19 -04:00
parent 9f2150c7d3
commit 2ce736ac50
24 changed files with 41 additions and 40 deletions

View file

@ -14,14 +14,16 @@ import qualified Command.Add
import Types.Key
def :: [Command]
def = [command "addunused" (paramRepeating paramNumRange)
def = [notDirect $ command "addunused" (paramRepeating paramNumRange)
seek "add back unused files"]
seek :: [CommandSeek]
seek = [withUnusedMaps start]
start :: UnusedMaps -> Int -> CommandStart
start = startUnused "addunused" perform (performOther "bad") (performOther "tmp")
start = startUnused "addunused" perform
(performOther "bad")
(performOther "tmp")
perform :: Key -> CommandPerform
perform key = next $ Command.Add.cleanup file key True