|
Latent Apprentice
Joined: 19 Aug 2002 Posts: 120 Location: USA
|
Posted: Sat Feb 01, 2003 7:14 am
multi word aliases |
is it possible to make an alias where you type "who family" and it outputs something else? up until now i have only used 1 word, just wondering if you could use 2 some how.
|
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Sat Feb 01, 2003 7:55 am |
ZMud will interpret the two things as two things.
You can make an alias out of the first word and then ignore the second
word completely:
#ALIAS who {#ECHO Do something else here;#NOOP Something to catch the paramter and ignore it}
Or you can store all the words after for reference or something:
#ALIAS who {#ECHO Do something different;#VAR whoparams "%-1";#SHOW Passed to the who alias @whoparams}
If you want to replace the who command and do send a changed who command
make sure you ~ the command in the alias so you don't cause a loop:
#ALIAS who {~who -i -t -b %-1}
Ton Diening |
|
|
|
Davos Adept
Joined: 30 Jan 2003 Posts: 228 Location: USA
|
Posted: Sat Feb 01, 2003 9:12 pm |
Or you could just use who_family or WhoFamily heh
The Seaworthy |
|
|
|
Latent Apprentice
Joined: 19 Aug 2002 Posts: 120 Location: USA
|
Posted: Sat Feb 01, 2003 9:55 pm |
I am currently using who_family, but im so used to typing it in without the underscore that i often forget so im just trying to find a way to type it in without the underscore and have it still work
|
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sun Feb 02, 2003 1:43 am |
#ALIAS who {#IF (%1 = "family") {your code here}}
Kjata |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun Feb 02, 2003 6:54 am |
#AL who {~who %replace( %-1, "family", "your family goes here")}
This allows you to use family anywhere, not just as the first item. It will also work with multiple families.
LightBulb
Advanced Member |
|
|
|
|
|