Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Aliases being able to inherit bases?

Aliases being able to inherit bases?

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Azoroth   (31 posts)  Bio
Date Tue 06 May 2008 10:00 PM (UTC)
Message
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.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Tue 06 May 2008 10:16 PM (UTC)
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #2 on Tue 06 May 2008 10:18 PM (UTC)
Message
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>


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


11,804 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.