Is there any way to detect whether an alias has been called from a script?
Set a variable to $true if the alias was called, and read te variable. if it is $true, then the alias was called
inside your alias, u can use the $event identifier
(it will return the event name if it's an event and $null if it's not)