Skip to content

Commit 316de8a

Browse files
committed
Add --quiet option
Closes #90
1 parent cdfab54 commit 316de8a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ struct Cli {
108108
/// Enable verbose logging
109109
#[clap(short, long, action = ArgAction::Count)]
110110
verbose: u8,
111+
112+
/// Quiet mode - suppress diagnostic messages and progress bars
113+
#[clap(short, long)]
114+
quiet: bool,
111115
}
112116

113117
fn download(url: &str) -> Result<impl io::Read> {
@@ -182,7 +186,7 @@ fn main() -> Result<()> {
182186
rows: cli.rows,
183187
speed: cli.speed,
184188
theme: cli.theme.map(|theme| theme.0),
185-
show_progress_bar: true,
189+
show_progress_bar: !cli.quiet,
186190
};
187191

188192
let input = BufReader::new(reader(&cli.input_filename_or_url)?);

0 commit comments

Comments
 (0)