mirror of
https://github.com/simonmichael/hledger.git
synced 2024-10-06 10:57:30 +03:00
imp: move --debug to help flags, making it more universal
This commit is contained in:
parent
e1991be46f
commit
3797fe13d3
@ -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 ?
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user