Skip to content

nounset redirect gate scans raw target text without quote awareness: set -u; echo hi > '$NOPE' misfires #1930

Closed

Description

@caomengxuan666

分歧(master 既存,clear-1915 簇 q1 探针发现)

set -u; echo hi > '$NOPE'
  • GNU 5.3.20:正常建文件 $NOPE、rc 0(单引号内不是活引用)。
  • rubash:rc 1,误报 unbound variable。

定性

重定向门的 nounset 预扫描走查 raw 文本、无引号感知(赋值/词面靠载体编码、raw 面没有)。与 procsub 跨度掩码(#1915/#1929)是不同机制:这里缺的是引号感知,不是跨度记录。探针与证据在 ~/workspace/clear-1915-procsub/REPORT.md §6(q1)。

归宿

nounset 扫描正确性后续批(与 #1931 双诊断同批);非 1.5.0 阻断(单引号重定向目标为窄面),但属 set -u 正确性族,后续批必收。

Regression seed: 上列一行,期望按 GNU。

Activity

  1. added
    bug
    gnu-baseline
    P2-medium
    area:expansion
    on Oct 28, 2026
  2. 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