mirror of
https://github.com/sharkdp/fd
synced 2024-10-14 11:42:46 +00:00
Windows: Check for xterm-256color environment variable as a proxy for color support
This commit is contained in:
parent
53c338d71f
commit
a81fef9992
|
@ -148,9 +148,9 @@ fn run() -> Result<ExitCode> {
|
|||
let case_sensitive = !matches.is_present("ignore-case")
|
||||
&& (matches.is_present("case-sensitive") || pattern_has_uppercase_char(&pattern_regex));
|
||||
|
||||
|
||||
#[cfg(windows)]
|
||||
let ansi_colors_support = ansi_term::enable_ansi_support().is_ok();
|
||||
let ansi_colors_support =
|
||||
ansi_term::enable_ansi_support().is_ok() || std::env::var_os("TERM").is_some();
|
||||
|
||||
#[cfg(not(windows))]
|
||||
let ansi_colors_support = true;
|
||||
|
|
Loading…
Reference in a new issue