#$EPIC: aliasctl.txt,v 1.3 2007/08/06 21:25:50 jnelson Exp $
$aliasctl(<domain> <operation> <operand> [<rval>])
$aliasctl(<domain> GETPACKAGE <lval>)
$aliasctl(<domain> GET <lval>)
$aliasctl(<domain> SETPACKAGE <lval> <package-name>)
$aliasctl(<domain> SET <lval> <rval>)
$aliasctl(<domain> MATCH <word>)
$aliasctl(<domain> PMATCH <pattern>)
$aliasctl(<domain> EXISTS <lval>)
If an invalid <domain> is chosen, the empty string is returned.
/alias foo echo this is a test!
/alias foo echo this is a test!
Getting and setting assigns, and setting aliases is provided only for completeness. You really shouldn't use $aliasctl() to obfuscate those operations.
This is the only way to get the “body” of an alias. This is the only way to get a list of aliases/assigns that begin with a given string. This is the only way to get a list of aliases/assigns that “match” a given pattern. This is the CHEAPEST way to test to see if an alias exists before you try to run it.
You can tell whether a built in command has been overridden by an alias by doing something like: $aliasctl(alias exists join) which would return 1 if a “join” alias exists, and 0 if it does not.
Currently, the “MATCH” and “PMATCH” operations do not work with the “LOCAL” domain. This may change in the future.