From 7fee69d7abfc3c24cc73e1cdc11f7fbf386aafb5 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 18 Oct 2024 00:10:42 -1000 Subject: [PATCH] imp:cli: deprecate always/never --color values (though still support) --- hledger/Hledger/Cli/CliOptions.hs | 5 +---- hledger/hledger.m4.md | 6 +++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/hledger/Hledger/Cli/CliOptions.hs b/hledger/Hledger/Cli/CliOptions.hs index ef4768590..5b34f0d75 100644 --- a/hledger/Hledger/Cli/CliOptions.hs +++ b/hledger/Hledger/Cli/CliOptions.hs @@ -250,10 +250,7 @@ terminalflags = [ flagNone ["no-pager"] (setboolopt "no-pager") "don't use a pager for long output" -- This has special support in hledger-lib:colorOption, keep synced ,flagReq ["color","colour"] (\s opts -> Right $ setopt "color" s opts) "YN" - (unlines - ["Use ANSI color codes in text output? Can be" - ,"'y'/'yes'/'always', 'n'/'no'/'never' or 'auto'." - ]) + "use ANSI color in terminal ? 'y'/'yes', 'n'/'no', or 'auto' (default)" ] -- | Flags for selecting flat/tree mode, used for reports organised by account. diff --git a/hledger/hledger.m4.md b/hledger/hledger.m4.md index 8eee77f0b..25bb234ad 100644 --- a/hledger/hledger.m4.md +++ b/hledger/hledger.m4.md @@ -767,8 +767,8 @@ and help output uses bold text for emphasis. You can override this in the usual ways. If the `NO_COLOR` environment variable is set, colour will be disabled by default. -Or you can use the `--color/--colour` option with a `yes`/`always` value, -or `no`/`never`, to force colour on or off. +Or you can use the `--color/--colour` option with a `y`/`yes` value, +or `n`/`no`, to force colour on or off. (This option doesn't work in a config file yet.) #### Box-drawing @@ -955,7 +955,7 @@ Default: `$HOME/.hledger.journal`. **NO_COLOR** If this environment variable exists (with any value, including empty), hledger will not use ANSI color codes in terminal output, -unless overridden by an explicit `--color=y`/`--colour=y` option. +unless overridden by an explicit `--color=y` or `--colour=y` option. # PART 2: DATA FORMATS