From 09e1f9c330ec99de06c834b2de95c378bc6d00d3 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 28 Aug 2020 15:49:12 +0200 Subject: add --count/-n flag --- src/main.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 0915f42..0ff9e44 100644 --- a/src/main.rs +++ b/src/main.rs @@ -92,6 +92,14 @@ pub struct Opt { #[structopt(short = "l", long = "files-with-matches")] file_name_only: bool, + /// Only output the number of matching logs. + #[structopt( + short = "n", + long = "count", + conflicts_with_all = &["sorting", "file-name-only"], + )] + count: bool, + /// Disable colored output. #[structopt(long = "no-color")] no_color: bool, -- cgit v1.2.3