alias - Make an alias or display defined aliases
alias name commands
alias pattern
Aliases are shortcuts for executing tcl commands.The first word of input is checked to see if it matches an alias. If if does than the commands associated with that alias are executed.
name has to be one word. commands is just a tcl script.Remember to use ; or newlines to separate ommands. Aliases you define can take arguments. In the commands associated with the alias %n is substituted for the nth argument given to the alias. Note that if an argument which is not a valid tcl list is used by the alias, an error will occur. %0 is all the arguments and if there isn't a %n argument to be substituted %n is set to an empty string.
Alias without any arguments will print out all the currently defined aliases. Alias with one argument will perform glob matching and return all the defined aliases matching the pattern.
alias targ {set target "%0"}
alias k {writemud
"kill $target"}
This elminates endlessly typing kill monster. targ monster
sets the global variable target to monster which k
subsequently uses.
alias add_friend {lappend friend_list "%0";
echo "** %0 added to friend
list. **"}
alias tfriend {foreach friend $friend_list {writemud
"tell $friend %0"}}
This, on muds that don't support mulit-person tells, lets
you make your own channel.
alias s*
Prints out all the aliases that begin with s.