theirix commented on code in PR #20368:
URL: https://github.com/apache/datafusion/pull/20368#discussion_r2824652180


##########
datafusion/sqllogictest/bin/sqllogictests.rs:
##########
@@ -813,6 +832,29 @@ impl Options {
             eprintln!("WARNING: Ignoring `--show-output` compatibility 
option");
         }
     }
+
+    /// Determine if colour output should be enabled, respecting --color, 
NO_COLOR, CARGO_TERM_COLOR, and terminal detection
+    fn is_colored(&self) -> bool {

Review Comment:
   Definitely. I utilised the pre-made [`clap::ColorChoice` 
enum](https://docs.rs/clap/latest/clap/enum.ColorChoice.html) to auto-populate 
the help and removed the option. It also required parsing `CARGO_TERM_COLOR`. 
Looks more concise now.
   Example:
   ```
         --color <MODE>                 Control colored output [default: auto] 
[possible values: auto, always, never]
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to