Allow colour to be configured with DFT_COLOR too

In #468 it's also mentioned that this couldn't be configured with an
environment variable.
pull/474/head
Wilfred Hughes 2023-01-25 16:43:16 +07:00
parent 4337fbbcd8
commit 3291da6be4
2 changed files with 4 additions and 0 deletions

@ -5,6 +5,9 @@
`--help` now shows the default value for all arguments (it was
previously missing `--color` and `--display`).
`--color` can now be configured with the environment variable
`DFT_COLOR`.
## 0.42 (released 15th January 2022)
### Parsing

@ -154,6 +154,7 @@ fn app() -> clap::Command<'static> {
Arg::new("color").long("color")
.possible_values(["always", "auto", "never"])
.default_value("auto")
.env("DFT_COLOR")
.value_name("WHEN")
.help("When to use color output.")
)