是否有一个相当于 bash `help` 内置函数的 zsh ?

gle*_*man 16 zsh

在 bash 中,我可以使用该help命令打印特定内置命令的概要

$ help pwd
pwd: pwd [-LP]
    Print the name of the current working directory.

    Options:
      -L    print the value of $PWD if it names the current working
            directory
      -P    print the physical directory, without any symbolic links

    By default, `pwd' behaves as if `-L' were specified.

    Exit Status:
    Returns 0 unless an invalid option is given or the current directory
    cannot be read.
Run Code Online (Sandbox Code Playgroud)

zsh 中是否有等效项,或者我只是使用man zshbuiltins

gle*_*man 14

正如@DavidPostill 评论中的Stack Overflow 问题所示,将其放入:~/.zshrc

unalias run-help
autoload run-help
HELPDIR=/usr/share/zsh/"${ZSH_VERSION}"/help
alias help=run-help
Run Code Online (Sandbox Code Playgroud)

如果您使用的是 macOS 并使用 Homebrew 安装,那么您需要HELPDIR将此行替换为:

HELPDIR=$(command brew --prefix)/share/zsh/help
Run Code Online (Sandbox Code Playgroud)