mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-08 07:09:28 +03:00
lib: debug output now respects --color/NO_COLOR/ANSI support
Debug output now selects color or monochrome in the same way as normal output.
This commit is contained in:
parent
5e57cfb43e
commit
2b04b76448
@ -116,12 +116,14 @@ import System.Console.ANSI (hSupportsANSIColor)
|
||||
import System.IO (stdout)
|
||||
|
||||
prettyopts =
|
||||
defaultOutputOptionsDarkBg
|
||||
-- defaultOutputOptionsLightBg
|
||||
-- defaultOutputOptionsNoColor
|
||||
baseopts
|
||||
{ outputOptionsIndentAmount=2
|
||||
, outputOptionsCompact=True
|
||||
}
|
||||
where
|
||||
baseopts
|
||||
| useColor = defaultOutputOptionsDarkBg -- defaultOutputOptionsLightBg
|
||||
| otherwise = defaultOutputOptionsNoColor
|
||||
|
||||
-- | Pretty print. Generic alias for pretty-simple's pPrint.
|
||||
pprint :: Show a => a -> IO ()
|
||||
|
Loading…
Reference in New Issue
Block a user