summaryrefslogtreecommitdiff
path: root/doc/en/plugins/alias.txt
blob: ee45ae632cf2a2d1a1d7a5b7a1ca025230866636 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
Aliases
=======

Installation
------------
You only have to load the plugin:

==============

 /load alias

==============

Usage
-----

This plugin defines two new global commands: _/alias_ and _/unalias_.

alias
~~~~~~
This command is used like this:

===============

 /alias my_alias an_existing_command fixed_arg

================
This will create a _/my_alias_ command, that when called, will run
_/an_existing_command fixed_arg_. If you give other parameters to the alias,
they will be passed to the existing command as well.


You can omit the _fixed_arg_ part if you don’t want to, of course.


There is also the possibility to change the order of parameters:

================
With

 /alias myalias command "%1 %0"

The command:

 /myalias foo bar

Will then run

 /command bar foo

because the %1 parameter is placed before the %0.

================

The numbers can be from 0 to 9.

.Possible examples
===================

 /alias truc say "%1 is AFTER %0 usually"

 /alias q quit

 /alias partauche ban "Partauche \"tg %0\""

===================

unalias
~~~~~~~~

This command removes a defined alias.

==================

 /unalias defined_alias

=================