Skip to content

"[bug] \u0016-i + stdin 模式下 $- 缺 i/s(GNU=himBHs)——交互插件守卫 [[ $- == *i* ]] 判非,主题/插件冒烟需 GATE-SKIP 才能测" #149

Closed

Description

@caomengxuan666

环境

rubash 041c17e;来源=target-ecosys/REPORT.md C-2。

现象

rubash -i 从 stdin 读脚本的会话里,$- 不含 i(也不含管道时的 s);GNU 为 himBHs。后果:一切交互守卫插件([[ $- == *i* ]])判非、静默跳过——生态插件/主题的自动化验收被系统性扭曲。

期望

-i 模式置 i 标志;stdin 非终端时的 s 标志按 GNU shell.c/flags 语义。

Activity

  1. added
    bug
    on Sep 26, 2026
  2. caomengxuan666 commented on Sep 26, 2026

    @caomengxuan666
    MemberAuthor

    已在 3bff4dd 修复并关闭。

    -i+stdin 下 $- 现补齐 i(forced_interactive,flags.c:174 + shell.c:672)与 s(read_from_stdin,shell.c:301,由 -s/无脚本操作数 stdin 置位),实现走 __RUBASH_INTERACTIVE/__RUBASH_READ_STDIN 内部 marker,验证不进外部命令 env、不传给 respawn 子 shell(父子双侧 hBc 一致)。8 模式矩阵双侧对齐,-c 与脚本文件模式红线零变化;449/449 lib 测试(含 6 项新回归)、linux/darwin 双交叉干净。

    顺带查明的两个既有字母缺口(未顺带修,另行跟踪):m(monitor)从不渲染(表缺条目 + -m invocation 还被当脚本名);H(histexpand)在 -i -c/-i file/-i -s 三条路径缺失(prepare_interactive_history 只在无参回落执行,GNU init_interactive shell.c:1830-1842 总是置 H)。已开后续单。

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions