${=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.
This forces parameter expansions to be split into separate words
before substitution, using IFS as a delimiter. This is done by
default in most other shells.
“裸”形式$=spec的解释如下${#spec}:
If the option POSIX_IDENTIFIERS is not set, and spec is a simple
name, then the braces are optional; this is true even for spe‐
cial parameters so e.g. $#- and $#* take the length of the
string $- and the array $* respectively. If POSIX_IDENTIFIERS
is set, then braces are required for the # to be treated in this
fashion.
对于“变量索引”的含义
IFS
:“变量索引”→“ ”、“ 、使用”、“ 、使用”、“ 、使用”。IFS
IFS
IFS
IFS
第一个“使用”链接指向 的文档
$=NAME
,如果您不习惯 zsh 语法,则很难找到该文档。$
开始参数扩展。参数扩展可以采用多种形式,包括. 该部分可以是参数名称或带有各种后缀之一的参数名称,用于执行前缀/后缀删除、模式替换、默认值注入等,元变量第一次出现时以不太清晰的方式记录(在的文档)。此外,当只是一个参数名称时,大括号是可选的,这在 和 的文档中提到,但也适用于等。${=spec}
spec
spec
${#spec}
spec
${name}
${#spec}
${=spec}
如果您询问的是
$=file
数组赋值parts=( ... )
,则它记录在参数扩展部分(或等效的man zshexpn
)中,从开始的小节开始${#spec}
“裸”形式
$=spec
的解释如下${#spec}
: