mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Only throw a recursion error if the command matches the alias name exactly
This commit is contained in:
parent
8b6783ea55
commit
863aeb3b4f
@ -98,7 +98,7 @@ class RecursiveAlias(AliasError):
|
||||
|
||||
def findAliasCommand(s, alias):
|
||||
s = re.escape(s)
|
||||
r = re.compile(r'(?:(^|\[)\s*%s|\|\s*%s)' % (s, s))
|
||||
r = re.compile(r'(?:(^|\[)\s*\b%s\b|\|\s*\b%s\b)' % (s, s))
|
||||
return bool(r.search(alias))
|
||||
|
||||
dollarRe = re.compile(r'\$(\d+)')
|
||||
|
Loading…
Reference in New Issue
Block a user