在 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.
zsh中是否有等价物,还是我只使用man zshbuiltins
?
如@DavidPostill 评论中的 Stack Overflow 问题所示,将其放入:
~/.zshrc
如果您在 macOS 上并使用 Homebrew 安装,那么您将需要用以下代码替换该
HELPDIR
行: