Added highlightonly/all option

This commit is contained in:
Andreas Schneider 2015-10-06 11:43:20 +02:00
parent 2752c839ed
commit 9a59bafc16
1 changed files with 7 additions and 0 deletions

View File

@ -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=<color> --bg=<color>');
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;