alias - Make an alias or display defined aliases
alias name ?script?
alias ?pattern?
Aliases are shortcuts for executing tcl scripts. The first word of input is checked to see if it matches an alias. If it does then the script associated with that alias is evaluated.
The name has to be one word. Aliases you define can take arguments. In the script associated with the alias, "%n" is substituted for the nth argument given to the alias or an empty string if such an argument doesn't exist. "%0" is all the arguments. "%n" can be escaped with a "\"
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 eliminates endlessly typing "kill monster". Typing "targ monster" sets the global variable target to "monster". The alias "k" would then send "kill monster" to the mud.
alias a {alias b {echo \%1}}
The "a" alias, no matter what arguments are given to it, sets the "b" alias to {echo %1}.
alias s*
Print out all the aliases that begin with s.