Alias: Difference between revisions

From Tsunami Wiki
Jump to navigationJump to search
Atlas (talk | contribs)
Created page with '{{command|description= An alias is basically a short cut for using skills on Tsunami. Learning to use them effectively is important.| use= *Command: [un]alias *Syntax: [un]alias …'
 
Atlas (talk | contribs)
No edit summary
 
Line 5: Line 5:
*Syntax: [un]alias [account] [ <alias> <command>  -clear ]
*Syntax: [un]alias [account] [ <alias> <command>  -clear ]


CHARACTER aliases:
 
====Character aliases:====
*alias                        View current aliases (CHARACTER and ACCOUNT).
*alias                        View current aliases (CHARACTER and ACCOUNT).
*alias <alias> <command>      Set the verb alias to execute command.
*alias <alias> <command>      Set the verb alias to execute command.
Line 12: Line 13:
*unalias <alias>              Removes <alias> from your alias list
*unalias <alias>              Removes <alias> from your alias list


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


====Substitution====
Substitution variable that exist are:
Substitution variable that exist are:
*$# - Where # is the number of the word after the verb to substitute.
*$# - Where # is the number of the word after the verb to substitute.

Latest revision as of 13:44, 9 February 2010

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