Alias

From Tsunami Wiki
Jump to: navigation, search

An alias is basically a short cut for using skills on Tsunami. Learning to use them effectively is important.


Using Alias

  • Command: [un]alias
  • Syntax: [un]alias [account] [ <alias> <command> -clear ]


Character aliases:

  • alias View current aliases (CHARACTER and ACCOUNT).
  • alias <alias> <command> Set the verb alias to execute command.
  • alias <alias> Check the value of <alias> (CHAR and ACCOUNT)
  • alias -clear Clear all current aliases
  • unalias <alias> Removes <alias> from your alias list


Account aliases:

  • alias account <alias> <command> Add alias for all chars on account.
  • alias account -clear Clear all current ACCOUNT aliases
  • unalias account <alias> Removes <alias> from your ACT alias list


Substitution

Substitution variable that exist are:

  • $# - Where # is the number of the word after the verb to substitute.
  • $* - Will be substituted with everything after the verb.

Another example: 'alias k kill $*' will expand 'k dealer' to 'kill dealer' However it is not required as 'alias k kill' will also expand 'k dealer' to 'kill dealer'

A better example of the use of the $* follows. 'alias sizeup consider $* sizeup' This will take any argument after typing sizeup and feed it into the alias : 'sizeup dog' -> 'consider dog sizeup' 'sizeup smurf 3' -> 'consider smurf 3 sizeup'


See also