alias - Make an alias or display defined aliases
alias name ?script?
alias ?pattern?
Aliases are shortcuts for executing tcl scripts. When the first word of input matches an alias name, the script associated with that alias is evaluated.
name will not be recognized if it contains a space. Aliases you define can take arguments. In an alias script "%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.
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 . {parse [history event [expr {[history nextid]-1}]]}
The alias "." evaluates the last command typed.
alias s*
Print out all the aliases that begin with s.