等号在 zsh 中有什么特殊含义?

What special meaning does an equal-sign have in zsh?

在我的 zsh 脚本中,我有一行

echo some text ================================

令我惊讶的是,这一行发出了一条错误消息:

zsh: =============================== not found

从命令行进行实验,我发现 shell 在等号出现时会变得不安:

$ echo =z
zsh: z not found

但是在这里,我们有:

$ echo =echo
/usr/bin/echo

从这个观察来看,好像

=XXX

会被解释为

$(which XXX)

但是,我在 zsh 联机帮助页中没有找到任何关于此 "substitution" 的信息。这段魔法在哪里描述的?

来自docs

14.7.3 ‘=’ expansion

If a word begins with an unquoted ‘=’ and the EQUALS option is set, the remainder of the word is taken as the name of a command. If a command exists by that name, the word is replaced by the full pathname of the command.

here更多的话