mirror of https://github.com/sharkdp/fd.git
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"
|
clap = "2.26.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
ansi_term = "0.9"
|
ansi_term = "0.10"
|
||||||
atty = "0.2"
|
atty = "0.2"
|
||||||
clap = "2.26.0"
|
clap = "2.26.0"
|
||||||
ignore = "0.2"
|
ignore = "0.2"
|
||||||
|
|
|
@ -79,6 +79,8 @@ fn main() {
|
||||||
Some("never") => false,
|
Some("never") => false,
|
||||||
_ => atty::is(Stream::Stdout),
|
_ => atty::is(Stream::Stdout),
|
||||||
};
|
};
|
||||||
|
#[cfg(windows)]
|
||||||
|
let colored_output = colored_output && ansi_term::enable_ansi_support().is_ok();
|
||||||
|
|
||||||
let ls_colors = if colored_output {
|
let ls_colors = if colored_output {
|
||||||
Some(
|
Some(
|
||||||
|
|
Loading…
Reference in New Issue