Not quite.

For a /command the alias takes precedence over the built-in command unless you use the ! prefix. So you can 'theme' how /msg or /notice behaves, but you can block the theme from overriding it by using !msg or /!msg. An exception is if an ON INPUT handler still sees the ($1 == /!msg) and insists on handling it.

For $word, it always calls the built-in identifier in preference over "alias word", unless you use a prefix. $.zip or $/zip calls "alias zip" but $zip calls the built-in identifier. You can use $~zip to either call the built-in identifier of that name, or returns $null if there is no built-in identifier.

Each of the $/ and $. and $~ formats do not trigger the identifier warning, so you can check for the existence of an identifier by using valid syntax then checking for $null. i.e.

//if ($~rands(1,2) == $null) echo -a this is a version less than 7.55

Built-in identifiers which require parameters check for the parenthesis, which is why this says there's no such identifier when there really is:

//echo -a $rand

Your alias can do a similar check to tell the difference between $myalias and $myalias() by checking if $0 is 0 or 1 or greater.

Your alias can tell the difference between being called as /myalias or $myalias by whether $isid is $true or $false.


Last edited by maroon; 22/03/19 09:23 PM.