about summary refs log tree commit diff
path: root/magrep.c
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-08-02 16:02:46 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-08-02 16:02:46 +0200
commit56e89c9a557cd1182001a8b1130d7f10f40cc96a (patch)
tree9d1f1d3cb85e82de66de979fdf0e68b67aca49ba /magrep.c
parentc99944cbc52cdd0770d3e1851e7a2ddbd0fe06c1 (diff)
downloadmblaze-56e89c9a557cd1182001a8b1130d7f10f40cc96a.tar.gz
mblaze-56e89c9a557cd1182001a8b1130d7f10f40cc96a.tar.xz
mblaze-56e89c9a557cd1182001a8b1130d7f10f40cc96a.zip
magrep: search message flags if header is empty
Diffstat (limited to 'magrep.c')
-rw-r--r--magrep.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/magrep.c b/magrep.c
index 7b6a7a4..0c53c9f 100644
--- a/magrep.c
+++ b/magrep.c
@@ -40,6 +40,13 @@ match(char *file, char *s)
 void
 magrep(char *file)
 {
+	if (!*header) {
+		char *flags = strstr(file, ":2,");
+		if (flags)
+			match(file, flags+3);
+		return;
+	}
+
 	char *filename = file;
 	while (*filename == ' ' || *filename == '\t')
                 filename++;