mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
Moved to atty
This commit is contained in:
parent
26aa1f346e
commit
bd6b958655
1 changed files with 1 additions and 1 deletions
|
@ -622,7 +622,7 @@ fn display_file_name(
|
||||||
let mut width = UnicodeWidthStr::width(&*name);
|
let mut width = UnicodeWidthStr::width(&*name);
|
||||||
|
|
||||||
let color = match options.opt_str("color") {
|
let color = match options.opt_str("color") {
|
||||||
None => stdout_isatty(),
|
None => atty::is(atty::Stream::Stdout),
|
||||||
Some(val) => match val.as_ref() {
|
Some(val) => match val.as_ref() {
|
||||||
"always" | "yes" | "force" => true,
|
"always" | "yes" | "force" => true,
|
||||||
"auto" | "tty" | "if-tty" => atty::is(atty::Stream::Stdout),
|
"auto" | "tty" | "if-tty" => atty::is(atty::Stream::Stdout),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue