REQUEST 1:
If Alias Groups could have a prefix and suffix string that is added to the front and back of all aliases under them.
EXAMPLE:
The MUD I'm working with allows compound commands separated by | characters. As a result, if I want to add a simple alias to change "bandage" into "bandage self" I need to use this:
Which is ugly and has the potential for errors when lots of aliases are being created. Especially because the MUD also uses implicit command completion, and so the bandage command can be "band", "banda", "bandag" or "bandage" which results in a final matching string of:
If I could pull out the prefix and suffix in the Alias Group, it would be much cleaner:
BENEFIT
Basic alias regexs are really easy to create for users of the package.
PROBLEM
To actually apply the alias, the combined regex is still needed to iterate over the command string. EDIT: Which I can't even do because I don't have pcre in Lua
REQUEST 2:
This is a two part request. First, a /g option for aliases, and to really make use of that, changes to matches are written back into command.
EXAMPLE:
With the above example, I would be able to make an alias with just the below, using the above prefix/suffix request:
Regex:(band(?:a(?:ge?)?)?)
Script:matches[2] = matches[2] .. " self"
PROBLEM
It is a little tricky to combine matches[] writing to command with /g matching.
REQUEST 1 alternate
An alternate would be to allow a Type: Custom for aliases. Then have an event that fired whenever the Custom aliases are changed. During that event scripting could modify the regex of the alias, which for Type:Custom aliases would be separate and not manually modifiable. With this I could add the prefix and suffix via script to the string the user entered and build the actual regex that way. I'd also be able to handle the implicit command completion for the user. I could translate something like band((age)) into band(?:a(?:ge?)?)? in addition to adding the prefix and suffix.