From 9a59bafc1631b2adf1e85f344dd05bd4f36d07d5 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 6 Oct 2015 11:43:20 +0200 Subject: [PATCH] Added highlightonly/all option --- UApp.pas | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/UApp.pas b/UApp.pas index 0d5cb3b..5a96c71 100644 --- a/UApp.pas +++ b/UApp.pas @@ -124,6 +124,11 @@ begin FCurrentLineFilter.Filters.Add(THighlightFilter.Create('.*', fg, bg, 0)); end; //Simple Mode + //If "only highlight" option is set, we append a "match all" filter so even + //normally non-matching lines are shown. + if HasOption('highlightonly') or HasOption('all') then + FLineFilters.Add(TLineFilter.Create('.*')); + if HasOption(OPT_LOGFILE) then FLogFileName := GetOptionValue(OPT_LOGFILE); @@ -418,6 +423,8 @@ begin Writeln(' outputs filtered results in a formatted HTML file'); Writeln(' --fg= --bg='); Writeln(' Sets the highlight color for the simple matcher (-s)'); + Writeln(' --highlightonly --all'); + Writeln(' Either option will also print non matching lines.'); Writeln(' -h --help'); Writeln(' show this help screen'); end;