From 525d9cd27080cdf5475c9d9b795022c1153a05a5 Mon Sep 17 00:00:00 2001 From: yo Date: Sat, 30 Mar 2024 08:50:44 +0100 Subject: [PATCH] BUGFIX partial match is no match --- app/daemon.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/daemon.go b/app/daemon.go index 7ef4225..5784acd 100644 --- a/app/daemon.go +++ b/app/daemon.go @@ -106,11 +106,16 @@ func (f *Filter) match(line *string) []string { } if f.pattern == nil { // No pattern, so this match will never actually be used - return []string{"."} + return nil } } } - return result + if len(result) == len(f.pattern) { + return result + } else { + // Incomplete match = no match. + return nil + } } func (f *Filter) sendActions(match []string, at time.Time) {