Skip to content

[bug] feeder 行粒度模式翻转:未闭合复合命令内 set 翻转影响同组 time 判定(GNU 按 complete_command) #1544

Closed

Description

@caomengxuan666

feeder 在未闭合复合命令内按行粒度翻转解析模式,GNU 按 complete_command 整体判定(parsetime 簇修 #1520 时量出的残余,基线既存):

{
set -o posix
time -p true
}
  • GNU bash 5.3.20:rc 0——{ ... } 是一个 complete_command,组内 set -o posix 在解析整组时尚未生效,time -p 按非 posix 判定(-p 词被接受、计时输出)。
  • rubash:rc 127——feeder 逐行喂入时第二行已按 posix 模式解析,time 被降为普通词、PATH 查找失败。

根因定位(parsetime REPORT §残余 1):feeder 的行粒度模式翻转 vs GNU 的 complete_command 解析单元;time 头裁决在 #1520 已改为解析期冻结,但 feeder 在分组未闭合时就已按行提交解析,冻结的仍是错时刻的模式。修复需动 feeder 积累核心(未闭合复合命令应积累到闭合后再以单元起始模式整段解析),#1520 簇按停损线未动。

Regression seed:本形态已以 GNU 期望 + #[ignore] 钉在 #1520 的回归文件中,修复时激活;另需覆盖 if/while/函数定义体内同形。

Activity

  1. added a commit that references this issue on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions