From bb0e958118f917907553075426c7d004dac2306c Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Tue, 3 Oct 2017 07:00:08 +0200 Subject: [PATCH] grep: allow the pattern to be empty --- modules/grep.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/grep.py b/modules/grep.py index 5c25c7d..fde8ecb 100644 --- a/modules/grep.py +++ b/modules/grep.py @@ -73,7 +73,7 @@ def cmd_grep(msg): only = "only" in msg.kwargs - l = [m for m in grep(msg.args[0] if msg.args[0][0] == "^" else ".*?(" + msg.args[0] + ").*?", + l = [m for m in grep(msg.args[0] if len(msg.args[0]) and msg.args[0][0] == "^" else ".*?(" + msg.args[0] + ").*?", " ".join(msg.args[1:]), msg, icase="nocase" in msg.kwargs,