$isalias » History » Version 3
Per Amundsen, 08/10/2015 07:05 AM
| 1 | 1 | Per Amundsen | _Added in 1.9.0_ |
|---|---|---|---|
| 2 | |||
| 3 | *$isalias(name)* |
||
| 4 | |||
| 5 | 2 | Per Amundsen | Returns [[$true]] if the specified name is an alias command that exists in your aliases or scripts. |
| 6 | 1 | Per Amundsen | |
| 7 | *Parameters* |
||
| 8 | |||
| 9 | name - The alias to find. |
||
| 10 | |||
| 11 | *Properties* |
||
| 12 | |||
| 13 | .fname - Returns the path and filename of the found alias |
||
| 14 | .alias - Returns the first line of the alias. |
||
| 15 | |||
| 16 | *Example* |
||
| 17 | |||
| 18 | <pre> |
||
| 19 | 3 | Per Amundsen | ; Create an alias |
| 20 | alias example { |
||
| 21 | ; Check if /example2 is an alias |
||
| 22 | //echo -ag $isalias(example2) |
||
| 23 | 1 | Per Amundsen | |
| 24 | 3 | Per Amundsen | ; Returns the code of the /example2 alias "-l test2 { echo -ag Hello World }" |
| 25 | //echo -ag $isalias(example2).alias |
||
| 26 | 1 | Per Amundsen | } |
| 27 | 3 | Per Amundsen | |
| 28 | ; Create a second alias |
||
| 29 | alias -l example2 { echo -ag Hello World } |
||
| 30 | 1 | Per Amundsen | </pre> |