mirror of
https://github.com/sharkdp/fd
synced 2024-10-04 14:59:15 +00:00
Auto disable colored output for unsupported Windows shells
This commit is contained in:
parent
6a01faf6e1
commit
ce73c086b6
|
@ -31,7 +31,7 @@ repository = "sharkdp/fd"
|
|||
clap = "2.26.0"
|
||||
|
||||
[dependencies]
|
||||
ansi_term = "0.9"
|
||||
ansi_term = "0.10"
|
||||
atty = "0.2"
|
||||
clap = "2.26.0"
|
||||
ignore = "0.2"
|
||||
|
|
|
@ -79,6 +79,8 @@ fn main() {
|
|||
Some("never") => false,
|
||||
_ => atty::is(Stream::Stdout),
|
||||
};
|
||||
#[cfg(windows)]
|
||||
let colored_output = colored_output && ansi_term::enable_ansi_support().is_ok();
|
||||
|
||||
let ls_colors = if colored_output {
|
||||
Some(
|
||||
|
|
Loading…
Reference in a new issue