Aliases being able to inherit bases?

Posted by Azoroth on Tue 06 May 2008 10:00 PM — 3 posts, 15,573 views.

#0
Was wondering if there is a way to create aliases that inherit the base of other aliases? I know this is possible in Zmud and an example of this would be:

#ALIAS bdoledr {dolw;wdollin;wlinmid;wmidpel;wpelosg;wosgroi;wroimid;wmidedr;wedr}

bdoledr being the new alias name and ({dolw;wdollin;wlinmid;wmidpel;wpelosg;wosgroi;wroimid;wmidedr;wedr}) using the paths/commands described in those aliases and executing them.

Thanks, if this is confusing, I'll try to explain further.
Australia Forum Administrator #1
Certainly, all you need to do is set the alias to "send to: execute".

This sends the "send" field to be re-evaluated by the command processor, thus the base aliases are then interpreted.

I assume you will have command stacking enabled, so that the semicolon breaks up the individual words. Then it would look like this:


<aliases>
  <alias
   match="bdoledr"
   enabled="y"
   send_to="10"
   sequence="100"
  >
  <send>dolw;wdollin;wlinmid;wmidpel;wpelosg;wosgroi;wroimid;wmidedr;wedr</send>
  </alias>
</aliases>


See http://mushclient.com/pasting for how to copy that into the client.
Australia Forum Administrator #2
If you didn't want to use command stacking, an alternative would be to simply place each alias on its own line:


<aliases>
  <alias
   match="bdoledr"
   enabled="y"
   send_to="10"
   sequence="100"
  >
  <send>dolw
wdollin
wlinmid
wmidpel
wpelosg
wosgroi
wroimid
wmidedr
wedr</send>
  </alias>
</aliases>