How can I use zsh's zargs with list of commands? I am aware of using something like sh -c but it seems like zsh would be able to do something more efficient.
I thought perhaps an anonymous function like:
zargs -I arg -- **/*.git -- function { cd $1/.. ; git log -1 --format=%cd } arg
but I get
zsh: parse error near `}'
Note: I am also aware I can solve this example with
zargs -I arg -- **/.git -- git -C arg/.. log -1 --format=%cd
but I'm looking for the more general solution.