pub fn if_tty(s: &str, style: Style) -> String {
    if isatty::stdout_isatty() {
        style.paint(s).to_string()
    } else {
        s.to_string()
    }
}
// if stdout is a TTY, then it returns a string with ansi codes according to
// style.  Otherwise, it returns the original string.
if stdout is a TTY, then it returns a string with ansi codes according to
style.  Otherwise, it returns the original string.
if stdout is a TTY then it returns a string with ansi codes according to style . Otherwise it returns the original string .
pub fn if_tty(s: &str, style: Style) -> String {
    if isatty::stdout_isatty() {
        style.paint(s).to_string()
    } else {
        s.to_string()
    }
}
pub fn if_tty ( s : & str , style : Style ) -> String { if isatty :: stdout_isatty ( ) { style . paint ( s ) . to_string ( ) } else { s . to_string ( ) } }
if stdout is a TTY, then it returns a string with ansi codes according to
style.
if stdout is a TTY then it returns a string with ansi codes according to style .
s
&str
style
Style
s
&str
style
Style