Skip to content

parameter expansion: ${v=x:=y} expands the value but never binds v (pre-scan := arm claims the fragment under a composite name) #1960

Closed

Description

@caomengxuan666

现象(#1953 修复簇三方实证,probes2/veq.sh)

${v=x:=y}:GNU 绑定 v=x:=y 并展开该值;rubash 展开值正确,但 v 永不绑定(展开后 v 仍未设置)。

机制

赋值预扫描的 := 臂以无效复合名 v=x 认领整个 fragment 并 return,= 臂永不执行。与 #1953 同源(${...} body 内第一个算子获胜的不变量),但可观测行为不同:#1953 是幻影展开导致的爆炸(已由 PR #1958 修复——先验 LHS 形再展开),本条是真绑定被错误认领吞掉。#1958 只消幻影展开、未动认领顺序,故本条独立立案。

期望

按 GNU parameter_brace_expand 的算子分发语义:body 的算子应为顶层第一个真算子;${v=x:=y} 中绑定目标 v、值 x:=y。修复须带三方(TIP/NEW/GNU)逐字节钉,含相邻形矩阵(:=\ 与 = 的嵌套/先后组合、带下标形、! 间接形)。

归宿

parameter-words 后续批;证据 ~/workspace/fix-1953/REPORT.md §6 与 probes2/veq.sh。

Activity

  1. added
    bug
    on Oct 28, 2026
  2. added
    gnu-baseline
    P2-medium
    area:expansion
    on Oct 28, 2026
  3. added a commit that references this issue on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P2-mediumarea:expansionbuggnu-baseline

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions