I was testing something out and used these functions with the command line, and noticed that the objects that they created could not be deleted until after I closed the profile and reopened it, and I'm unsure as to why.
Also, just using the permAlias function also created a numbered list of all existing tempAlias objects (which disappeared when I closed and reopened the profile).
For reference, the exact commands that I used are as follows:
lua permAlias("test","","^test$",[[print("blah")]])
lua permRegexTrigger("test","",{"^test$"},[[print("blah")]])
Bug With permAlias and permRegexTrigger Functions
Re: Bug With permAlias and permRegexTrigger Functions
+1 I am also experiencing this bug today, except:
In case it's helpful, here is my alias:
Pattern:
Body:
...and then on the command line, you can enter this to create an example alias:
- by "closing/reopening the profile" I think you might mean the Script Editor window.
- it seems nothing in the Script Editor window may be deleted after this point, before closing/reopening it
In case it's helpful, here is my alias:
Pattern:
Code: Select all
^#alias (\S*) (.+)$
Code: Select all
if exists(matches[2], "alias") == 1 then
cecho("<cyan>---- ALIAS ALREADY EXISTS: " .. matches[2]);
return;
end
permAlias(
"" .. matches[2],
"",
"^" .. matches[2] .. "(.*)$",
[[expandAlias("]] .. matches[3] .. [[" .. matches[2]);]]);
Code: Select all
#alias foo bar
- SlySven
- Posts: 1034
- Joined: Mon Mar 04, 2013 3:40 pm
- Location: Deepest Wiltshire, UK
- Discord: SlySven#2703
Re: Bug With permAlias and permRegexTrigger Functions
demonic is probably going to start jumping up and down when he sees this!
expandAlias(...) has got to be the most abused function that we provide - except that this might actually be one of those cases where it enables something that cannot easily be done on the command line otherwise. Other than that I am not sure I can comment further until this has been considered more thoroughly...
expandAlias(...) has got to be the most abused function that we provide - except that this might actually be one of those cases where it enables something that cannot easily be done on the command line otherwise. Other than that I am not sure I can comment further until this has been considered more thoroughly...