imp: help: add standard help and (hidden) --debug flags

This commit is contained in:
Simon Michael 2024-05-29 09:19:16 -10:00
parent f88aa8f871
commit 085910708b
2 changed files with 8 additions and 6 deletions

View File

@ -23,6 +23,7 @@ module Hledger.Cli.CliOptions (
reportflags, reportflags,
clihelpflags, clihelpflags,
helpflags, helpflags,
helpflagstitle,
detailedversionflag, detailedversionflag,
flattreeflags, flattreeflags,
hiddenflags, hiddenflags,

View File

@ -32,13 +32,14 @@ import Safe (headMay)
helpmode = hledgerCommandMode helpmode = hledgerCommandMode
$(embedFileRelative "Hledger/Cli/Commands/Help.txt") $(embedFileRelative "Hledger/Cli/Commands/Help.txt")
[flagNone ["i"] (setboolopt "info") "show the manual with info" [flagNone ["i"] (setboolopt "info") "show the manual with info"
,flagNone ["m"] (setboolopt "man") "show the manual with man" ,flagNone ["m"] (setboolopt "man") "show the manual with man"
,flagNone ["p"] (setboolopt "pager") "show the manual with $PAGER or less" ,flagNone ["p"] (setboolopt "pager") "show the manual with $PAGER or less\n(less is always used if TOPIC is specified)"
,flagNone ["help","h"] (setboolopt "help") "show this help" ]
[(helpflagstitle, clihelpflags)]
[
flagReq ["debug"] (\s opts -> Right $ setopt "debug" s opts) "[N]" "show debug output (levels 1-9, default: 1)"
] ]
[]
[]
([], Just $ argsFlag "[TOPIC]") ([], Just $ argsFlag "[TOPIC]")
-- | Display the hledger manual in various formats. -- | Display the hledger manual in various formats.