


TinTin #alias command
This command allows you to replace a long command or sequence of commands with
single word. For example, you could type ‘grin’ and have ‘emote grins so
evilly that you want to hide.’ sent to the world. To do this you would enter the
following command:
#alias grin {emote grins so evilly that you want to hide.}
You can also send multiple commands by separating the right-hand text with
semicolons. For example, the following alias will send the ‘grin’ command
followed by the ‘dance’ command:
#alias happy {grin;dance}
Note: The use of curly braces is critical here. Without the curly braces, this
would be interpreted as ‘#alias happy grin’ followed by ‘dance’.
Parameter Substitution
The #alias command also allows for parameter substitution. The variables %0,
%1, …, %9 contain the arguments to the command. %0 contains the entire
argument string, while %1 … %9 contain the first through the ninth arguments. For
example, assume you defined the following alias:
#alias grin {emote grins so %1 that you want to %2.}
Then, when you enter the command:
grin wickedly {slap him}
The following string will be sent to the world: (Note that ‘slap him’ is
surrounded with curly braces, so it is treated as a single parameter.)
emote grins so wickedly that you want to slap him.
If there are no variables in the alias definition, then the entire argument
string is appended to the alias command. For example, consider the example given
at the beginning of this document:
#alias grin {emote grins so evilly that you want to hide.}
If the user entered ‘grin Be afraid. Very afraid.’, then the following text
would be sent to the world:
emote grins so evilly that you want to hide. Be afraid. Very afraid.
Recursive Aliases
Pueblo doesn’t check for recursive aliases, but does check for excessive
recursion. For example, assume you defined the following alias:
#look {look Coyotl}
This is a recursive alias, since ‘look’ is both the name of the alias and the
initial word of the alias. This will crank for a while and eventually
terminate with an error. If you want to do this, you can do the following, using the ‘ verbatim line’ prefix:
#look {\look Coyotl}
Command syntax
#alias
This format will list all defined aliases.
#alias {name}
This format will list all aliases that match name. ‘*’ may be used as a
wildcard character. For example, ‘gr*’ matches all actions that start with the letters ‘gr’.
#alias {name} {substitution text}
This format will define a new alias. Whenever you type name, then substitution text will be sent to the world.
Also see
TinTin wildcards
#unalias