The zsh whence hierarchy, the -f flag prints function definitions:
zsh$ whence -f foo foo () { echo hello } zsh$
In zsh, type is defined as the equivalent of whence -v , so you can continue to use type , but you need to use the -f argument:
zsh$ type -f foo foo () { echo hello } zsh$
And finally, in zsh which is defined as the equivalent of whence -c is the result of printing in a csh-like format, so which foo will give the same results.
man zshbuiltins for all this.
pb2q Jul 13 2018-12-12T00: 00Z
source share