On 2021-02-02 6:21 p.m., Bart Schaefer wrote:
_fn2hist() {
   emulate -L zsh
   local cmd=$1
   shift
   if [[ -n $functions[$cmd] ]]
   then
     print -rS "${$(functions -x 2 $cmd)#$cmd} ${${(qq)@}}"
   fi
   $cmd "$@"
}
Intended to be used like this:
myfn() { : do whatever myfn does }
alias myfn='_fn2hist myfn'