#alias

Syntax: #alias {<alias name>} {<commands>} [group_name]

The #alias command replaces a large string or a string of JMC's commands. Basically, it allows the user to create a "shortcut" to a command or string of text. Whenever the user types an alias name, JMC will replace it with the second part of the alias. The variables %0-%9 may be used in the commands, and can contain the arguments of an alias. The %0 variable contains the rest of the string, following the actual alias. Variables %1-%9 contain words of the string.

By default alias creates into group named “default”.

Example:

#alias {k} {kill %1} {common}

Now, every time you type "k dragon" the string "kill dragon" will be sent to a MUD. This alias assigned to group named “common”.

Example:

#alias putex {put %1 into %2;#showme {%0 done}}

Now you can type "putex bread chest". The string "put bread into chest" will be sent to the MUD and the string "bread chest done" will be shown for you. In this example the %0 variable contains "bread chest", %1 contains "bread" and %2 contains "chest".

If the second parameter of the #aliascommand doesn't exist, then JMC will show you all defined aliases with a name that matches the first argument.

Example:

#alias k

When you type this command, JMC will show the (predefined) alias named "k" to you.

#alias*get*

JMC will show all aliases, containing "get" in the alias definition, for you.

If #alias is used without any arguments, then JMC will list all defined aliases for you.

See also: #unalias JMC commands groups #group