summaryrefslogtreecommitdiff
path: root/CmdLine.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-07-08 16:58:54 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-07-08 16:58:54 -0400
commit249e0861520a2904f70bf4b79a4ebddc009c3683 (patch)
treed5a4bb91ac80ad3fe44ed6b168bfc60ccb60668e /CmdLine.hs
parent931f0f7bc6eb1ea6d25dec52e14c584f0cbd4778 (diff)
converted fsck's options to optparse-applicative
Global options and seeking and key options are still to be done.
Diffstat (limited to 'CmdLine.hs')
-rw-r--r--CmdLine.hs9
1 files changed, 7 insertions, 2 deletions
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