Info
This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: How to tell that stdout is a color terminal?
I know that it's a color terminal and insert escape ANSI codes in my print out. However if I need to capture stdout some other app and redirect to my terminal, it will come in black and white. So, I use some special command flag to get a colorized out from the app. I looked at how to set stdout:
pub fn stdout<T: Into<Stdio>>(&mut self, cfg: T) -> &mut Command
I looked at StdoutStdout and didn't find how to tell it supports color. I know, there is Rust Shell, so I need just look in its code. But if someone can tell me without looking in its code, I appreciate the help.
2 posts - 2 participants
🏷️ Rust_feed