diff --git a/hledger/Hledger/Cli/CliOptions.hs b/hledger/Hledger/Cli/CliOptions.hs index 5dc7d9d78..e26448722 100644 --- a/hledger/Hledger/Cli/CliOptions.hs +++ b/hledger/Hledger/Cli/CliOptions.hs @@ -233,12 +233,6 @@ reportflags = [ ]) ,flagOpt "yes" ["pretty"] (\s opts -> Right $ setopt "pretty" s opts) "YN" "Use box-drawing characters in text output? Can be\n'y'/'yes' or 'n'/'no'.\nIf YN is specified, the equals is required." - - -- ,flagOpt "1" ["debug"] (\s opts -> Right $ setopt "debug" s opts) "LVL" "show debug output (levels 1-9, default: 1)" - -- flagOpt would be more correct for --debug, showing --debug[=LVL] rather than --debug=[LVL]. - -- But because we handle --debug specially, flagReq also works, and it does not need =, removing a source of confusion. - -- (This involves specially adding the flag value if missing in Cli.hs.) - ,flagReq ["debug"] (\s opts -> Right $ setopt "debug" s opts) "[1-9]" "show this level of debug output (default: 1)" ] helpflags :: [Flag RawOpts] @@ -248,6 +242,11 @@ helpflags = [ ,flagNone ["info"] (setboolopt "info") "show the manual with info" ,flagNone ["man"] (setboolopt "man") "show the manual with man" ,flagNone ["version"] (setboolopt "version") "show version information" + -- ,flagOpt "1" ["debug"] (\s opts -> Right $ setopt "debug" s opts) "LVL" "show debug output (levels 1-9, default: 1)" + -- flagOpt would be more correct for --debug, showing --debug[=LVL] rather than --debug=[LVL]. + -- But because we handle --debug specially, flagReq also works, and it does not need =, removing a source of confusion. + -- (This involves specially adding the flag value if missing in Cli.hs.) + ,flagReq ["debug"] (\s opts -> Right $ setopt "debug" s opts) "[1-9]" "show this level of debug output (default: 1)" ] -- XXX why are these duplicated in defCommandMode below ?