0
|
1 |
|
|
2 |
/TEMPLATECMD [command [= [template]]]
|
|
3 |
|
|
4 |
Allows to define alias-commands, using templates.
|
|
5 |
/templatecmd
|
|
6 |
Prints list of current template commands.
|
|
7 |
/templatecmd command
|
|
8 |
Prints template, corresponding to specified command.
|
|
9 |
/templatecmd command =
|
|
10 |
Destroys command.
|
|
11 |
/templatecmd command = template
|
|
12 |
Defines new template command.
|
|
13 |
Template may contain next special sequences:
|
|
14 |
- $$ will be replaced with just $;
|
|
15 |
- $* will be replaced with all templatecmd args;
|
|
16 |
- $0 will be replaced with templatecmd name;
|
|
17 |
- $n will be replaced with corresponding positional argument from command line.
|
|
18 |
|
|
19 |
Note: last detected argument will not be stripped from quotes and will contain all end of argument line.
|
|
20 |
|
|
21 |
Examples:
|
|
22 |
* /templatecmd a = echo $2 $1 $5
|
|
23 |
then "/a 1 2 3" will print "2 1"
|
|
24 |
but "/a 1 2 3 4 5 6 7" will print "2 1 5 6 7".
|
|
25 |
* /templatecmd b = echo $0 $*
|
|
26 |
then "/b a b c d" will print "b a b c d"
|
|
27 |
|
|
28 |
Note: be careful not to cause endless loops!
|