grep: allow the pattern to be empty
This commit is contained in:
parent
b15d18b3a5
commit
bb0e958118
1 changed files with 1 additions and 1 deletions
|
@ -73,7 +73,7 @@ def cmd_grep(msg):
|
||||||
|
|
||||||
only = "only" in msg.kwargs
|
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:]),
|
" ".join(msg.args[1:]),
|
||||||
msg,
|
msg,
|
||||||
icase="nocase" in msg.kwargs,
|
icase="nocase" in msg.kwargs,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue