diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-07-09 01:53:15 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-07-09 01:53:15 -0400 |
commit | 70ce779d1fb8e4ab1a0bb3c09e742036ee05eed3 (patch) | |
tree | 918d5cc94443d52d3b4b00d2c4586550eea8d8a7 | |
parent | 32274462439c44972f5cec1054b623ad4396909f (diff) |
few more subcommand --help improvements
-rw-r--r-- | CmdLine.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/CmdLine.hs b/CmdLine.hs index fd85248fb..b4e0ea044 100644 --- a/CmdLine.hs +++ b/CmdLine.hs @@ -82,9 +82,9 @@ parseCmd :: CmdParams -> [Command] -> (Command -> O.Parser v) -> O.ParserResult parseCmd allargs allcmds getparser = O.execParserPure (O.prefs O.idm) pinfo allargs where pinfo = O.info (O.helper <*> subcmds) O.fullDesc - subcmds = O.subparser $ mconcat $ map mkcommand allcmds + subcmds = O.hsubparser $ mconcat $ map mkcommand allcmds mkcommand c = O.command (cmdname c) $ O.info (mkparser c) - (O.fullDesc <> O.header (cmddesc c)) + (O.fullDesc <> O.header (cmddesc c) <> O.progDesc (cmddesc c)) mkparser c = (,) <$> pure c <*> getparser c |