1
I'm looking for ability to run certain cmdlets when calling files with some extensions. For example, when calling PS> .\test.php
I want to call Invoke-Php .\test.php
. Something like suffix aliases in ZSH.
For now I know that i can just assign php extension to some script, but it will affect explorer too, and it's not what i'm looking for. Maybe it's possible to "hook" expression invoking process?
Edit: I'm looking for something like that: https://serverfault.com/questions/165598/can-i-hook-powershell-to-call-a-function-each-time-i-execute-a-command/186468#186468 but working not only in PATH.