Keep output colorized for 'full' and 'color' style

fixes #332
This commit is contained in:
sharkdp 2020-10-15 21:35:25 +02:00 committed by David Peter
parent 89737785f8
commit daf5ced498
2 changed files with 5 additions and 1 deletions

View File

@ -20,6 +20,9 @@
- The `plot_parametrized.py` script now infers the parameter name, and its `--parameter-name` argument has been deprecated. See #253, #318.
## Bugfixes
- Keep output colorized when the output is not interactive and `--style=full` or `--style=color` is used.
## Other
## Packaging

View File

@ -159,7 +159,8 @@ fn build_hyperfine_options(matches: &ArgMatches<'_>) -> Result<HyperfineOptions,
OutputStyleOption::Basic | OutputStyleOption::NoColor => {
colored::control::set_override(false)
}
_ => {}
OutputStyleOption::Full | OutputStyleOption::Color => colored::control::set_override(true),
OutputStyleOption::Disabled => {}
};
options.shell = matches