我发现了这段代码:
map () {
eval "$initDocs"
usage "<lambda-function> [<item>...]"
example "'<--- \$1 --->'" a b c d
eval "$doneDocs"
typeset f="$1"
shift
map_ () {
echo ${(e)==f}
}
eval "$loopNow" map_
}
我不明白${(e)f}
和之间有什么区别${(e)==f}
。
答案1
从zshexpn(1)
:
${=spec}
Perform word splitting using the rules for SH_WORD_SPLIT during the
evaluation of spec, but regardless of whether the parameter appears
in double quotes; if the `=' is doubled, turn it off.
换句话说,${==f}
显式指定将关闭SH_WORD_SPLIT
此单个扩展,无论它是否全局处于活动状态。