Add pattern filter option
This adds a new item filter option --filter-pattern and removes the whole -S parameter logic, while making -S an alias for --filter-pattern. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
@@ -198,6 +198,8 @@ struct apoint *apoint_scan(FILE * f, struct tm start, struct tm end,
|
||||
if (filter) {
|
||||
if (!(filter->type_mask & TYPE_MASK_APPT))
|
||||
return NULL;
|
||||
if (filter->regex && regexec(filter->regex, buf, 0, 0, 0))
|
||||
return NULL;
|
||||
if (filter->start_from >= 0 && tstart < filter->start_from)
|
||||
return NULL;
|
||||
if (filter->start_to >= 0 && tstart > filter->start_to)
|
||||
|
||||
Reference in New Issue
Block a user