Any way to get list of functions defined in zsh (like alias command for aliases)

zsh

I can type

alias

and get a list of defined aliases in zsh

How can I get a list of function names defined in zsh?

When I type "functions", my shell window hangs after displaying lots of functions, always ending at

__rvm_checksum_none () {
    [[ -z "${_checksum_md5:-}" && -z "${_checksum_sha512:-}" ]]
}
__rvm_checksum_read () {

What's super annoying is that this won't quit with ctrl-c (using item2 AND terminal).

iterm2:
enter image description here

Picture of terminal having the same issue:
enter image description here

Best Answer

With cheating by looking at the _functions completion function, I'm able to answer your question:

The functions are stored in an associative array functions, so to get only the function names (k flag for keys) in alphabetical order (o flag for ordering) you can use

print -l ${(ok)functions}
Related Question