From 249e0861520a2904f70bf4b79a4ebddc009c3683 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 8 Jul 2015 16:58:54 -0400 Subject: converted fsck's options to optparse-applicative Global options and seeking and key options are still to be done. --- CmdLine.hs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'CmdLine.hs') diff --git a/CmdLine.hs b/CmdLine.hs index 82c9b4289..89f9964b7 100644 --- a/CmdLine.hs +++ b/CmdLine.hs @@ -75,8 +75,13 @@ dispatch fuzzyok allargs allcmds commonoptions fields header getgitrepo = do parseCmd :: CmdParams -> [Command] -> (Command -> O.Parser v) -> O.ParserResult (Command, v) parseCmd allargs allcmds getparser = O.execParserPure (O.prefs O.idm) pinfo allargs where - pinfo = O.info (O.subparser $ mconcat $ map mkcommand allcmds) O.idm - mkcommand c = O.command (cmdname c) (O.info (mkparser c) O.idm) + pinfo = O.info (O.subparser $ mconcat $ map mkcommand allcmds) + ( O.fullDesc + <> O.progDesc "hiya" + <> O.header "ook - aaa" + ) + mkcommand c = O.command (cmdname c) $ O.info (mkparser c) + (O.fullDesc <> O.progDesc (cmddesc c)) mkparser c = (,) <$> pure c <*> getparser c -- cgit v1.2.3