Q: Passing pacman cmd to a hook/trigger


I’m trying to create a trigger for pre/post install hook for pacman. So I have everything, I think, but I would like to pass the actual pacman command (i.e. which packages are being added/removed/changed) that’s to trigger the hook , to the script that will be run.

Any help would be much appreciated.