$isalias » History » Version 8
Per Amundsen, 12/14/2019 08:14 AM
1 | 1 | Per Amundsen | _Added in 1.9.0_ |
---|---|---|---|
2 | |||
3 | 7 | Per Amundsen | *$isalias(name, [N])* |
4 | 1 | Per Amundsen | |
5 | 6 | Per Amundsen | Returns [[$true]] if the specified name is an alias command that exists in your aliases or scripts, otherwise [[$false]]. |
6 | 1 | Per Amundsen | |
7 | *Parameters* |
||
8 | |||
9 | name - The alias to find. |
||
10 | 7 | Per Amundsen | [N] - If N = 0, number of lines for the alias, otherwise the Nth alias line. (optional) |
11 | 1 | Per Amundsen | |
12 | *Properties* |
||
13 | |||
14 | 8 | Per Amundsen | .line - Returns the line in the file where the alias is defined. *(AdiIRC only)* |
15 | 1 | Per Amundsen | .fname - Returns the path and filename of the found alias. |
16 | 7 | Per Amundsen | .alias - Returns the Nth line of the alias. |
17 | .ftype - Returns "alias" if the alias is found in an alias file, otherwise "remote". |
||
18 | 1 | Per Amundsen | |
19 | *Example* |
||
20 | |||
21 | <pre> |
||
22 | 3 | Per Amundsen | ; Create an alias |
23 | alias example { |
||
24 | ; Check if /example2 is an alias |
||
25 | //echo -ag $isalias(example2) |
||
26 | 1 | Per Amundsen | |
27 | 4 | Per Amundsen | ; Returns the code of the /example2 alias "-l example2 { echo -ag Hello World }" |
28 | 3 | Per Amundsen | //echo -ag $isalias(example2).alias |
29 | 1 | Per Amundsen | } |
30 | 3 | Per Amundsen | |
31 | ; Create a second alias |
||
32 | alias -l example2 { echo -ag Hello World } |
||
33 | 1 | Per Amundsen | </pre> |