Add --quiet flag, make colors respect --quiet so you just get the output and nothing else.

master
Mikko Juola 3 years ago
parent 109171b50e
commit 91dee4f114

@ -22,6 +22,9 @@ struct Cli {
#[arg(long)]
param_path: String,
#[arg(short, long, action)]
quiet: bool,
#[arg(long)]
prompt: Option<String>,
#[arg(long)]
@ -81,6 +84,12 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
if !colored::control::SHOULD_COLORIZE.should_colorize() {
be_quiet = true;
}
if cli.quiet {
be_quiet = true;
}
if be_quiet {
colored::control::SHOULD_COLORIZE.set_override(false);
}
#[cfg(feature = "opencl")]
let opencl: Option<OpenCL> = {

Loading…
Cancel
Save