![zsh 확장에서 `==`는 어떤 역할을 합니까?](https://linux55.com/image/140784/zsh%20%ED%99%95%EC%9E%A5%EC%97%90%EC%84%9C%20%60%3D%3D%60%EB%8A%94%20%EC%96%B4%EB%96%A4%20%EC%97%AD%ED%95%A0%EC%9D%84%20%ED%95%A9%EB%8B%88%EA%B9%8C%3F.png)
이 코드를 찾았습니다.
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