diff --git a/src/afterfact.rs b/src/afterfact.rs index 82fac4334..2a0168e4f 100644 --- a/src/afterfact.rs +++ b/src/afterfact.rs @@ -493,6 +493,11 @@ fn emit_csv( .iter(), ); + let terminal_width = match terminal_size() { + Some((Width(w), _)) => w as usize, + None => 100, + }; + if !output_option.no_summary && !rule_author_counter.is_empty() { write_color_buffer( &disp_wtr, @@ -513,14 +518,19 @@ fn emit_csv( .ok(); println!(); - output_detected_rule_authors(rule_author_counter, 3); + let table_column_num = if terminal_width < 130 { + 3 + } else if terminal_width < 170 { + 4 + } else if terminal_width <= 190 { + 5 + } else { + 6 + }; + output_detected_rule_authors(rule_author_counter, table_column_num); println!(); } - let terminal_width = match terminal_size() { - Some((Width(w), _)) => w as usize, - None => 100, - }; println!(); if output_option.visualize_timeline { _print_timeline_hist(timestamps, terminal_width, 3); diff --git a/src/main.rs b/src/main.rs index 2f73d55b5..f4842443d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1061,7 +1061,7 @@ impl App { tl.search_dsp_msg(event_timeline_config, stored_static); } if stored_static.output_path.is_some() { - println!("Scanning finished. Please wait while the results are being saved."); + println!("\nScanning finished. Please wait while the results are being saved."); } println!(); detection.add_aggcondition_msges(&self.rt, stored_static);