convert all commands to work with optparse-applicative

Still no options though.
This commit is contained in:
Joey Hess 2015-07-08 15:08:02 -04:00
parent 3125da54f6
commit 6e5c1f8db3
99 changed files with 391 additions and 297 deletions

View file

@ -23,9 +23,10 @@ import System.Console.GetOpt
cmd :: Command
cmd = noCommit $ noRepo startNoRepo $ dontCheck repoExists $
command "help" "COMMAND" seek SectionCommon "display help"
command "help" SectionCommon "display help"
"COMMAND" (withParams seek)
seek :: CommandSeek
seek :: CmdParams -> CommandSeek
seek = withWords start
start :: [String] -> CommandStart
@ -47,7 +48,7 @@ showCommonOptions = putStrLn $ usageInfo "Common options:" gitAnnexOptions
showGeneralHelp :: IO ()
showGeneralHelp = putStrLn $ unlines
[ "The most frequently used git-annex commands are:"
, unlines $ map cmdline $ concat
, unlines $ map cmdline $
[ Command.Init.cmd
, Command.Add.cmd
, Command.Drop.cmd