From d1f49b0ad032f13adc39d963cc8ceca28215b1d5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 2 Jul 2012 00:53:00 -0400 Subject: add fields to git-annex-shell --- CmdLine.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'CmdLine.hs') diff --git a/CmdLine.hs b/CmdLine.hs index 910f228b6..edbe5e107 100644 --- a/CmdLine.hs +++ b/CmdLine.hs @@ -30,8 +30,8 @@ type Params = [String] type Flags = [Annex ()] {- Runs the passed command line. -} -dispatch :: Bool -> Params -> [Command] -> [Option] -> String -> IO Git.Repo -> IO () -dispatch fuzzyok allargs allcmds commonoptions header getgitrepo = do +dispatch :: Bool -> Params -> [Command] -> [Option] -> [(String, String)] -> String -> IO Git.Repo -> IO () +dispatch fuzzyok allargs allcmds commonoptions fields header getgitrepo = do setupConsole r <- E.try getgitrepo :: IO (Either E.SomeException Git.Repo) case r of @@ -40,6 +40,7 @@ dispatch fuzzyok allargs allcmds commonoptions header getgitrepo = do state <- Annex.new g (actions, state') <- Annex.run state $ do checkfuzzy + forM_ fields $ \(f, v) -> Annex.setField f v sequence_ flags prepCommand cmd params tryRun state' cmd $ [startup] ++ actions ++ [shutdown $ cmdoneshot cmd] -- cgit v1.2.3