Project

General

Profile

$isalias » History » Version 9

Per Amundsen, 02/23/2023 02:04 PM

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 9 Per Amundsen
table(ktable).
10
|*Parameter*|*Description*|
11
| name | The alias to find. |
12
| [N] | If N = 0, number of lines for the alias, otherwise the Nth alias line. (optional) |
13 1 Per Amundsen
14
*Properties*
15
16 9 Per Amundsen
table(ktable).
17
|*Property*|*Description*|
18
| .line | Returns the line in the file where the alias is defined. *(AdiIRC only)* |
19
| .fname | Returns the path and filename of the found alias. |
20
| .alias | Returns the Nth line of the alias. |
21
| .ftype | Returns "alias" if the alias is found in an alias file, otherwise "remote". |
22 1 Per Amundsen
23
*Example*
24
25
<pre>
26 3 Per Amundsen
; Create an alias
27
alias example {
28
  ; Check if /example2 is an alias
29
  //echo -ag $isalias(example2)
30 1 Per Amundsen
31 4 Per Amundsen
  ; Returns the code of the /example2 alias "-l example2 { echo -ag Hello World }"
32 3 Per Amundsen
  //echo -ag $isalias(example2).alias
33 1 Per Amundsen
}
34 3 Per Amundsen
35
; Create a second alias
36
alias -l example2 { echo -ag Hello World }
37 1 Per Amundsen
</pre>