FICS - Free Internet Chess Server
8708 31ST Ave N
New Hope
Mn 55427

Usage: alias [word [string]]

The "alias" command sets up a command alias so that 'word' is equivalent to
typing 'string'.


alias:  If no parameter is supplied all of your aliases are displayed.
word:   The word for the alias. If 'string' is not supplied it lists the
        command associated with 'word'.
string: The command string to use for the alias.


In order for an alias to actually do something, the server has to process
each command you type. This is what happens:

 1. If your command begins with a $, no alias substitution is done.

 2. The first word is compared against your "alias" list, looking for a

 3. The first word is compared against the server aliases, looking for a

 4. If no match is found, the word is compared against the server commands.
    This means you can overwrite server commands with an alias.


If the first word of your command matches an alias, it is replaced with the
alias 'string'. The rest of what you type is substituted into the alias as
'parameters'. You can access these parameters with special characters. They
all start with an $.

$$  Replace with a $ (let's you use a '$' in the new command
$@  Replace with all parameters typed after 'word'
$n  Replace with parameter number n
$-n Replace with all parameters 1 through n
$n  Replace with all parameters from n onward
$m  Replace with my name
$o  Replace with my (last) opponent's name
$p  Replace with my partner's name
$.  Replace with the last person I told to
$,  Replace with the last channel I told to


 o Use the "unalias" command to remove an alias.

 o You may not create an alias for the quit command, or for the unalias

 o A list of system aliases is available from the help system_alias file.

 o You can not put multiple commands with one alias.

 o Aliases are not transitional. This sequence of commands alias foo bar
   alias bar baz Will NOT result in foo being equivalent to baz.

WARNING: Be careful to avoid using an alias that can also stand for another
command on the server. For example, "fg" could be a chess move (for f-pawn X
g-pawn), so don't have "fg" be an alias. For similar reasons, it would not be
best to use "t" as an alias since it is already assigned as an alias for
"tell". You could do so, of course; but then you would not be able to use the
system alias for tell unless you unalias your alias.


Some examples for useful aliases.

alias gm say Good move!
     If you type 'gm' it will say 'Good move!' to your opponent.
alias gg say Good game, $o!
     If you type 'gg' it will say 'Good game, <opponent's name>!'
alias greet it waves at $1. How are you? $2-
     You can type 'greet playername Enjoy dinner?' and it will shout '-->
     yourname waves at playername! How are you? Enjoy dinner?'.
alias afk set busy is away for a bit
     Sets your busy string to 'is away for a bit' if you type 'afk'
alias s1 seek 5 0 blitz f m
     If you type 's1' it will "seek" a 5 0 blitz game to all those who match
     your formula and set it to manual verification.
alias sf seek $1 $2 f
     Typing 'sf 3 0' will seek a 3 0 game and your opponent must fit your
     formula. 'sf 2 12' will seek a 2 12 game restricted to your formula.
alias 50 xtell 50 $@
     You can now chat in channel 50 by typing in '50 whatever you want to
     say'. By using xtell the ',' system alias will allow fast communications
     to another channel.


system_alias unalias


Created: 22 February 2002 DAV
Last Modified: 30 December 2007 mhill

Login Now | Register | Download | Teaching Ladder | Events | Sponsors | Contact us | Links
Last modified: Sun Feb 11 14:27:58 GMT Standard Time 2007