mirror of
https://github.com/uutils/coreutils
synced 2024-09-06 16:03:44 +00:00
Moved to atty
This commit is contained in:
parent
26aa1f346e
commit
bd6b958655
|
@ -622,7 +622,7 @@ fn display_file_name(
|
|||
let mut width = UnicodeWidthStr::width(&*name);
|
||||
|
||||
let color = match options.opt_str("color") {
|
||||
None => stdout_isatty(),
|
||||
None => atty::is(atty::Stream::Stdout),
|
||||
Some(val) => match val.as_ref() {
|
||||
"always" | "yes" | "force" => true,
|
||||
"auto" | "tty" | "if-tty" => atty::is(atty::Stream::Stdout),
|
||||
|
|
Loading…
Reference in a new issue