diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-07-10 13:18:46 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-07-10 13:23:06 -0400 |
commit | 19a3a331c35238a10ec2c537cf64d0b4c1fb290c (patch) | |
tree | ca5d79d0be1a80c01c9ad452331bdbebc1c4430a /CmdLine.hs | |
parent | 9886c302ef538e538ec7d48b94374b9d2400004f (diff) |
finished converting all the main options
Diffstat (limited to 'CmdLine.hs')
-rw-r--r-- | CmdLine.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/CmdLine.hs b/CmdLine.hs index 722881893..492a3b75f 100644 --- a/CmdLine.hs +++ b/CmdLine.hs @@ -33,7 +33,7 @@ import Command import Types.Messages {- Runs the passed command line. -} -dispatch :: Bool -> CmdParams -> [Command] -> [Parser GlobalSetter] -> [(String, String)] -> IO Git.Repo -> String -> String -> IO () +dispatch :: Bool -> CmdParams -> [Command] -> [GlobalOption] -> [(String, String)] -> IO Git.Repo -> String -> String -> IO () dispatch fuzzyok allargs allcmds globaloptions fields getgitrepo progname progdesc = do setupConsole go =<< (E.try getgitrepo :: IO (Either E.SomeException Git.Repo)) @@ -81,7 +81,7 @@ dispatch fuzzyok allargs allcmds globaloptions fields getgitrepo progname progde Just n -> n:args {- Parses command line, selecting one of the commands from the list. -} -parseCmd :: String -> String -> [Parser GlobalSetter] -> CmdParams -> [Command] -> (Command -> O.Parser v) -> O.ParserResult (Command, v, GlobalSetter) +parseCmd :: String -> String -> [GlobalOption] -> CmdParams -> [Command] -> (Command -> O.Parser v) -> O.ParserResult (Command, v, GlobalSetter) parseCmd progname progdesc globaloptions allargs allcmds getparser = O.execParserPure (O.prefs O.idm) pinfo allargs where @@ -93,7 +93,7 @@ parseCmd progname progdesc globaloptions allargs allcmds getparser = mkparser c = (,,) <$> pure c <*> getparser c - <*> combineGlobalSetters globaloptions + <*> combineGlobalOptions globaloptions synopsis n d = n ++ " - " ++ d intro = mconcat $ concatMap (\l -> [H.text l, H.line]) (synopsis progname progdesc : commandList allcmds) |