shell - zsh 内置的 "where"的目的是什么?

标签 shell zsh

我发现用谷歌搜索是不可能的,也无法在手册页中找到信息。

最佳答案

来自 http://zsh.sourceforge.net/Doc/Release/Shell-Builtin-Commands.html :

where [ -wpms ] name ... Equivalent to whence -ca.

和:

whence [ -vcwfpams ] name ... For each name, indicate how it would be interpreted if used as a command name.

-v Produce a more verbose report.

-c Print the results in a csh-like format. This takes precedence over -v.

-w For each name, print ‘name: word’ where word is one of alias, builtin, command, function, hashed, reserved or none, according as name corresponds to an alias, a built-in command, an external command, a shell function, a command defined with the hash builtin, a reserved word, or is not recognised. This takes precedence over -v and -c.

-f Causes the contents of a shell function to be displayed, which would otherwise not happen unless the -c flag were used.

-p Do a path search for name even if it is an alias, reserved word, shell function or builtin.

-a Do a search for all occurrences of name throughout the command path. Normally only the first occurrence is printed.

-m The arguments are taken as patterns (should be quoted), and the information is displayed for each command matching one of these patterns.

-s If a pathname contains symlinks, print the symlink-free pathname as well.

关于shell - zsh 内置的 "where"的目的是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29245718/

相关文章:

linux - 仅 Rsync 较新的文件和文件夹

bash - 将 Zsh 历史保存到 ~/.persistent_history

vim - zsh 函数退出后搞砸了提示

ruby - ri 不在 zsh 中工作

linux - 在 *nix 中,我们可以只为一个命令提供脚本吗?

linux - 如何在shell脚本中显示不同时区变量中存储的日期

macos - Mac Bash 脚本在 Do 上失败?

shell - ZSH Agnoster 主题显示机器名称

bash - 无法将 Bash 脚本转换为 Zsh 脚本

c - C程序结果后ZSH自动打印 '%'