man combines the zsh run-help function with the traditional command man and the GNU info function. If a help-file is found in $HELPDIR, it is read by the zsh-function run-help , otherwise run-help defaults to the man command and displays the man page. The first aspect of this functionality requires that you first generate the help files from the ZSH man page. When this is done, each individual function and built-in command in the ZSH will have its own help-file entry. Run the function build-helpfiles to generate these the first time. The file $ZDOT/environment will then automatically set the $HELPDIR variable the next time a shell is started.
This function also uses the function settab to show the named process running and then resets itself with settab (so iTerm users will have man commandname or more commandname or info commandname displayed in the tab.