Skip to content

Releases

v1.5.2

Choose a tag to compare

@github-actions github-actions released this 26 Nov 00:04
ec14a90

修复

  • GNU 差分修复波(2026-11-22 – 11-24):窗口内本仓共关闭 56 单,其中 8 单(#2810、#2828、#3965、#4001、#4002、#4059、#4060、#4080)已列入 1.5.1 清单、不重复计入,本版新增 48 单(四仓同期共关闭 74 单、合并 PR 97 张;四仓本版新增合计 64 单),全部以 GNU Bash 5.3.20 为规范源、经真 oracle 逐形差分定谳后修复,每条均带以 issue 号命名的回归钉。按主题机械归类(每单只计一族):fd/重定向 7、引号与词法 1、执行与子进程 1、declare/readonly/local 2、算术 3、参数展开 2、作业控制与 wait 1、case 1、补全 1、heredoc/herestring 8、数组/assoc 2、[[ ]] 2、procsub 7、coproc 3、trap 1、其他 6,合计 48(完整清单见下)。冻结头为 master d6328755(#4196 合入点)。
  • 推进波要点:外部报告面大部全清——ShiomiHC 第二批八单(#4125、#4127–#4133)与 xuangeyouneihan 的 #4138、#4149 均已修复关单(同批仅余 #4126 待作者返工)。其中 #4149 把 #684 的控制台行规程推广到进程内模拟 cat 的三个 stdin 读者(共享纯裁决单元 veof_verdict 与 ConsoleLineDiscipline 状态机,read 的两处内联裁决同步迁入、无第二走法);#4158 让进程内 eval 经普通重定向计划安装输入侧(绑定点在内建分发层,避开 mapfile -C 的 #3660 共享流绑定);#4159 在两处算术求值点结算 DISCARD 类重定向展开失败的 latch;#4171(jhermelink)剥除进程内管道阶段操作数的 blank guard 泄漏,与简单命令路径的物化契约对齐。本波残差另立 #4166、#4170、#4172、#4175 跟踪。收尾波(11-24 – 11-25):coproc 死亡退役家族 #4181、#4184、#4185 与 cat 自重定向死锁 #4180 全清;ShiomiHC 的 #4189(procsub 生产者前导重定向与捕获字节序)修复关单;heredoc 警告归属家族 #4169、#4190、#4193 全清(残面 #4197 跟踪)。

完整清单

窗口(2026-11-22 – 11-24)内关闭、本版新增的 48 单按主题机械归类如下(每单只计一族,标题逐字取自 issue 原文):

fd/重定向(7 单)

  • #4099 重定向词内 :? 参数错误对普通命令被误判整脚本致命(GNU 只判命令失败续行)
  • #4131 A builtin's > file stays open after the builtin returns, so a pipeline started right after cannot open the file with read-only sharing
  • #4146 Failed expansion with 2>/dev/null leaks fd 2 to /dev/null for the rest of the script
  • #4151 Redirecting, touching or cping to /dev/tty, /dev/stdin, /dev/stdout or /dev/stderr creates regular CON, CONIN$, CONOUT$ files in the current directory
  • #4158 eval's own input redirections are silently dropped (output side fine)
  • #4159 A DISCARD-class redirect expansion failure silently swallows the NEXT command in the list
  • #4180 cat 操作数即自身重定向目标时死锁(>> 自追加 / > 自截断后挂死)

引号与词法(1 单)

  • #4132 [gnu-baseline] Sourced file: backquote body containing << misroutes a later exit to the parent script (residual of #3962/#4018)

执行与子进程(1 单)

  • #4149 行内Ctrl-D把提交行切开:子进程收到EOF,后半段被shell执行,提示符也不换行

declare/readonly/local(2 单)

  • #3970 [bug] declare 家族复合赋值不做 brace 展开:declare e=({1..3}) 只存 1 个元素(GNU 3)
  • #4123 [gnu-baseline] declare/local compound assignment to readonly in function: missing function-named first diagnostic (follow-up to #2658)

算术(3 单)

  • #2826 [perf] 算术求值缺通用编译缓存:每求值新建 parser,现以三条形状 fastpath 代替
  • #4090 [longtail G5] errexit: arithmetic expansion error must DISCARD the command and continue (assignment / echo / [[ ]] faces)
  • #4130 Assignment: $(( … $(cmd) … )) is stored as text when the RHS is quoted or not a lone $(( ))

参数展开(2 单)

  • #4004 [gnu-baseline] double-quoted ${} span boundary: quoted } inside default ends span early, filename diverges from GNU
  • #4068 [gnu-baseline] bad-substitution pre-scan discard skips word-internal comsub side effects

作业控制与 wait(1 单)

  • #4097 wait after STOP+CONT+KILL must report 147 silently (currently 137 plus a Killed notice)

case(1 单)

  • #4031 [gnu-baseline] case 体在 $( 嵌套 placement 下被 case-pattern tracker 误读(#4026 钉文件自承残差)

补全(1 单)

  • #4101 bind -x widget 只 unset READLINE_LINE 时 READLINE_POINT 被钳制到 0(应保持原值)

heredoc/herestring(8 单)

  • #4093 herestring to an external command: ${var:=word} in the herestring must not persist in the parent (child-context expansion)
  • #4128 "$( … )": a quoted <<X spanning lines appends 0x1c to the last word before )
  • #4138 #1025 落下了heredoc
  • #4140 Unterminated-heredoc EOF warning is deduplicated across distinct commands in one script
  • #4141 Quoted comsub with piped heredoc leaks the delimiter line (with 0x1c) into output
  • #4169 Two heredoc comsubs in one reader unit: the earlier one's EOF warning never fires (lexer rotation mark reaches only the last)
  • #4190 comsub heredoc warnings: line attribution seeds from command start; same-text dedup swallows distinct occurrences
  • #4193 [bug] herestring-fed comsub loses the heredoc EOF warning entirely (IFS_GLUE marker dropped on the herestring path)

数组/assoc(2 单)

  • #4098 数组元素赋值不应用重定向(入向静默 rc=0、出向不建文件)
  • #4102 导入 GROUPS 的元素面仍走 live 组数组(${GROUPS[0]} / GROUPS[0]=e)

[[ ]](2 单)

  • #4125 [[ =~ ]]: BASH_REMATCH drops or rewrites the bytes 0x11, 0x17, 0x18, 0x1a, 0x1c, 0x1f
  • #4133 [gnu-baseline] [[ =~ ]] under LC_ALL=C re-encodes subject bytes 0x80-0xff as UTF-8 (split from #4125)

procsub(7 单)

  • #3094 [design] process substitution yields /dev/fd/N: enumerated cases of where that path resolves and where it does not
  • #4092 [longtail G8] compound procsub diagnostic reports the compound's own line instead of the ambient frame line
  • #4103 /dev/fd procsub 管道同秒内建时 -nt/-ot 视 mtime 有严格序(GNU 视其相等)
  • #4127 Windows: inside <(…), >(…) and coproc, variables whose names differ only in case become one variable
  • #4129 >(…): the consumer ignores the fd 1 / fd 2 redirections around the command — its output escapes $( ), { …; } > file, 2> file and exec >
  • #4135 <(…): the producer ignores the fd 0 / fd 2 redirections around the command — its stderr escapes { …; } 2> file, $( … 2>&1), f 2> file and exec 2>
  • #4189 <(…) producer: an earlier 2> on the same command does not apply to it, and its capture output lands after the consumer's

coproc(3 单)

  • #4181 coproc: subshell write to a dead coproc stdin after read-EOF kills the shell with SIGPIPE (141); GNU retires the parent fds and fails the redirect with EBADF
  • #4184 [gnu-baseline] coproc death retirement misses the command-substitution completion disposal point (vars stay bound after comsub)
  • #4185 [gnu-baseline] async subshell keeps coproc endpoints: writes into the live coproc where GNU's async child gets EBADF

trap(1 单)

  • #4096 ERR trap: pipeline region adjudication in a subshell function reports the body line instead of the region (close-paren) line

其他(6 单)

  • #2812 [perf] 测量专用构建变体:feature 门控的分配计数,计时与分配两轴分离
  • #4094 empty HOME: cd ~ must fail with 'null directory'; pushd ~ / pushd -n ~ empty-expansion faces
  • #4095 type -a under-reports ./ matches for repeated empty PATH elements (visit/fold accounting missing)
  • #4105 Windows 原生路径转换改写导出 POSIX 路径(issue149 基线红)
  • #4150 mkdir -p C:/x (or /c/x) creates a stray C: directory in the current directory
  • #4154 env-value conversion (#4064) collides with the #149 verbatim export contract — boundary ruling needed

(重发注记:首发因 release 工作流 fmt 门拦下存量格式漂移而撤回;本 tag 位于 fmt-only 修复 #4199 的合入点 ec14a903,与冻结头 d6328755 的差异为纯空白格式、零 token 改动。)

v1.5.1

Choose a tag to compare

@github-actions github-actions released this 22 Nov 13:09
a8d2825

修复

  • 深审修复波(1.5.1 向,2026-11-04):两轮深度审计(约 214 条经队长复核的发现)中可局部修复项全部落地——解析器诊断归因对齐 GNU(case/if/函数/算术-for/命令替换/EOF 各形态的报错令牌与行号,#2739–#2754、#2679);heredoc 展开上下文统一(#2676、#2681);解析器挂死与解析期代码执行两处高危关闭(#2682、#2686);状态变更内建在重定向失败时不再执行(#2692);环境导入不再误剥小写变量的导出标记(#2723);compspec 锚定与补全分发面修正(#2724、#2726、#2727);词法/展开/作用域多处 GNU 对齐(#2668–#2675、#2756–#2767、#2778)。每条修复均带以 issue 号命名的回归钉。结构性余项(单一展开管线、fdwalk 等)按 1.5.1 专项六件工程推进,残差均已逐条立单。
  • GNU 差分修复波(2026-11-04 – 11-22):2026-11-03 至 11-22 窗口内本仓共关闭 703 单(其中挂 1.5.1 里程碑 456 单;四仓同期合计关闭 926 单、合并 PR 1060 张),全部以 GNU Bash 5.3.20 为规范源、经真 oracle 逐形差分定谳后修复,每条均带以 issue 号命名的回归钉。按主题机械归类(每单只计一族):fd/重定向 80、解析与诊断 68、引号与词法 28、执行与子进程 59、展开 10、declare/readonly/local 33、算术 28、参数展开 38、作业控制与 wait 40、case 23、补全 16、heredoc/herestring 23、数组/assoc 31、[[ ]] 18、procsub 19、nounset 13、glob 8、trap 19、coproc 18、其他 131,合计 703(完整清单见下)。冻结头为 master eeb424da(#4067 合入点);已知轮换/环境性 census 红与 goldens #4038 切片非确定性均已逐项定性、不属本版回归(见发版卷宗冻结头测试总表)。

完整清单

窗口(2026-11-03 – 11-22)内关闭的 703 单按主题机械归类如下(每单只计一族,标题逐字取自 issue 原文):

fd/重定向(80 单)

  • #2395 [bug] exec 接管道 stdin 时物化残留临时文件且重定向丢失
  • #2613 [fd] 管道 stage 子进程根本不交付 {var} 绑定(EBADF,W3 stage 方言)
  • #2615 [fd] {var} 分配在模型空间而非 OS 空间,$v 数字与 GNU 分歧(文件结果一致)
  • #2662 [upstream] read: read -d with a high-byte (>= 0x80) delimiter reads nothing
  • #2688 [A2-01] Spawn fd aliasing: children inherit the same file at duplicate descriptor numbers
  • #2689 [A2-02] command as a pipeline stage drops the command's own redirections
  • #2690 [A2-03] /dev/stdout reopen (O_TRUNC) semantics missing on the exec redirect face
  • #2691 [A2-04] >&/dev/fd/N and >&/dev/stderr fail with ENOENT instead of duplicating the fd
  • #2718 [B2-F06] Redirect-only commands expand redirect words before binding their (permanent) assignments
  • #2748 [B6-R10] function NAME without () and with a redirection is run as an external command
  • #2773 driver: set -v echoes rendered commands at execution time, not input lines as read [B4-F04]
  • #2775 fd: varredir_close OFF ignored — command-scoped {var} fds always closed at command end [B4-F13]
  • #2787 [B6-R13 face 4, decision D3] -c route reports status 2 for a read-time comsub failure; GNU reports 127
  • #2793 /dev/tcp 进程内可用,但 socket fd≥3 不随外部子进程传递;/dev/udp 静默丢包
  • #2803 [bug] exec with a command treats >&fd / >&- as output to a file named fd / -
  • #2821 [bug] 带命令的 exec 只应用最低编号的输出重定向,其余输出重定向被静默丢弃
  • #2848 [GAP-12 tail] Session face for the retained invocation's shopt flags (enter_interactive read)
  • #2880 [bug] Background fifo reader can die before applying its redirects — parent's exec 6> fifo open deadlocks (run-test test1.sub dance)
  • #2883 Interactive read -p prompt renders raw-byte marker pairs instead of the control bytes
  • #2979 printf: remaining locale faces (byte_mode, \u gate, decimal_point) read the process env, not the variable-table guard
  • #3046 exec in a pipeline/subshell ignores stdin redirect from a character device (reads EOF) and drops stderr redirects
  • #3061 [bug] printf -v 'x[0]' element bind leaks raw compound storage encoding on scalar read-back
  • #3104 raw-byte (U+E000) pairs leak at name-consumption boundaries: redirect targets, test/[ operands, source, cd (E000-domain counterpart of #3076)
  • #3187 [bug] read -t with invalid timeout is diagnosed only after redirection succeeds; GNU validates the timeout first
  • #3191 read -r -a 在单字节 locale 下字节域分裂丢空字段(#2819 残余)
  • #3201 comsub 外部子进程 ambient fd 交付不稳定(多数运行整段缺失,与 #2688 别名异源)
  • #3212 read -d 分隔符字节与后续数据字节构成合法 UTF-8 时在传输文本中不可见(joined 形态)
  • #3213 varredir 物化 fd 在 shell 自身 /proc/$$/fd 视图不可见(GNU 可见)
  • #3218 PATH/名字折叠丢逐字符来源:同名真 Latin-1 字与 byte char 混用取字节拼写,折叠串作键共享重定向旗标
  • #3221 junit-formatter.bats 仍报 15 instead of 13:嵌套 tap13 行经 ambient fd 3 泄漏(#3149 残余)
  • #3286 已删 cwd 下相对输出重定向至已存在 FIFO 即时 ENOENT(GNU 阻塞 rendezvous 后成功)
  • #3291 read: C.UTF-8 file loop fd_table mb serve diverges on multibyte delimiter remainder
  • #3293 read: byte-served path skips the -t timed judge (and invalidates the stream arrival table)
  • #3294 read -n: illegal UTF-8 sequence measured as 1-byte units (GNU/glibc mbrtowc consumes the whole sequence)
  • #3308 [bug][fd] 脚本模式 $(外部 | 外部):管道首进程 stderr 绕过全部重定向直写控制台(-c 模式正常;GNU 无此行为)
  • #3311 [bug] exec with a command opens fd>=3 redirect targets but never passes the fd to the child
  • #3312 [bug] exec with a command routes device redirect targets through a /tmp sink file, silently swallowing write failures
  • #3313 [bug] exec with a command replaces <&- with /dev/null instead of closing stdin
  • #3325 timed 体内内层 compound 重定向失败不到达 ERR 裁决(time { if … < /bad; })
  • #3334 [bug] read -n/-N counts characters instead of bytes in C locale
  • #3401 [bug] termsig death still delayed on comsub, blocking-read and simulated-exec waits (residual of #3284)
  • #3402 [bug] pipeline stage stderr bypasses the fd table on the Windows concurrent path (Windows face of #3308)
  • #3403 [bug] sequential redirect loop resolves 2>&1 against the live fd 1 target instead of the dup-time snapshot
  • #3432 [bug] test -ef/-nt/-ot resolve /proc/self/fd/N and /dev/fd/N to the wrong file (off by one fd)
  • #3539 [bug] $BASH_COMMAND of a top-level command renders redirections outside print_cmd.c print_redirection (>&2, 3>&2- dropped, &> split)
  • #3560 [bug] Windows: a command's own N>&- does not revoke the ambient fd N handed to a rubash child
  • #3640 [bug] Shell holds its startup cwd open on fd 3, so exec 3>file lands on fd 4
  • #3644 Windows:command_substitution_values.rs 的 use std::io::Read 在 Windows 上未使用
  • #3706 [bug] Group redirect { ...; } N<redir does not restore fd N to its pre-group target
  • #3726 fd: /dev/tcp|udp bind restores a retired entry (same hazard as #3706)
  • #3727 fd: function-call stdin bindings restore retired fd 0 entries (same hazard as #3706)
  • #3728 fd: read from /dev/tcp restores a retired fd 0 entry (same hazard as #3706)
  • #3729 fd: stdio-marker reinstate restores a retired entry (same hazard as #3706)
  • #3733 fd: redirect failure mid-list does not undo partial binds (GNU undo_partial_redirects)
  • #3770 read on write-only fd 0 fails silently instead of read: 0: read error: Bad file descriptor
  • #3785 [bug] read -n/-N counts characters instead of bytes in C locale on redirected / pipeline stdin (follow-up to #3334)
  • #3792 [bug] cmd <&N on a write-only fd fails the redirect ("N: Bad file descriptor") instead of dup'ing the descriptor; emulated cat reads the file instead
  • #3814 子 shell 的 8<&- 泄漏到父 shell:( … ) 8<&- 后父 shell fd 8 损坏
  • #3815 嵌套组内层 fd 8 恢复落到野管道:{ { …; } 8</dev/null; …; } 8</dev/null
  • #3819 [bug] failed pipe creation under fd exhaustion is silently ignored; the pipeline runs instead of failing ("pipe error")
  • #3828 [bug] output redirects fail spuriously when umask strips owner-write from the created file ("f: Permission denied", rc 1, data lost)
  • #3852 redirect failure does not set the exit status (GNU sets $? to 1)
  • #3856 [bug] fd>=3 delivery to children dead on Windows since #3736: fork_respawn_transport_key strips _RUBASH_FD* for every non-respawn birth
  • #3892 exec: {var} 重定向绑定在同 list 后续条目失败时被回滚(GNU varassign 无 undo 记录,绑定存活)
  • #3917 残差(#3640/#3891):exec 3>file / exec 4>file 不落指定 fd,自带钉两格恒红
  • #3938 持久 exec 重定向落点的完整性残差:dup 源不物化 / ≥10 被占用保持虚拟回退 / 快照恢复留 dup 描述符(#3917 相邻面)
  • #3939 /dev/zero 的 <> 分裂模型:读写臂为两个文件描述,共享偏移与 GNU 分歧(P3)
  • #3943 [bug] read -d with a multibyte delimiter stops on a raw byte equal to the delimiter's codepoint
  • #3944 [bug] read -d with a single-byte delimiter >= 0x80 fails on file-backed input under a UTF-8 locale
  • #3945 [bug] read -t 0 returns success when no input is available
  • #3985 subshell ( exec … >&3 ) 3>/dev/full: shell-side EACCES at fd binding instead of child's ENOSPC write failure
  • #3991 [gnu-baseline] redirect undo saves are never materialized: dup from a save slot fails EBADF (1>&10 after exec 9>file)
  • #3995 [gnu-baseline] cat - inside a file-redirected group poisons the next fd-0 read (silent empty, rc=0)
  • #3997 [gnu-baseline] fd-table /dev/full binding never reaches external children (ambient fd>=3 delivery drops the slot)
  • #3999 [gnu-baseline] read serve face has no undo-save resolution (0<&10 inside a read list still EBADF)
  • #4000 [gnu-baseline] move (N>&M-) retires a handle a same-walk dup still aliases: flush writes to a closed descriptor
  • #4024 [gnu-baseline] 同 list 从 walk save 槽 dup 回 stdio fd 得到死端点(静默丢输出),GNU 从真描述符 dup 正常
  • #4027 [gnu-baseline] 同 walk 先重绑 fd N(生 save)后 move 关 N:GNU 恢复 save 绑定,rubash 的 persist 关闭胜出致后续 >&N EBADF
  • #4044 [gnu-baseline] exec walk inside a nested context closing fd 1 also kills the parent shell's fd 1
  • #4054 [test-infra] issue3997 fd-enumeration pins assume a clean ancestor fd set — harden against harness-held fds

解析与诊断(68 单)

  • #2635 [bug] RLIMIT_NOFILE 软限内重定向目标 fd ≥ 限额时不报错(GNU: Bad file descriptor, rc 1)
  • #2637 [bug] history -c 带多余操作数时报错且不清表(GNU 静默 rc 0 清空)
  • #2639 [bug] times 无效选项报错独缺 line 1: 前缀(GNU: line 1: times: -x: invalid option)
  • #2665 [upstream] Diagnostic fidelity family: line-number drift, message shapes, Rust-format leakage, help layout, missing identifier diagnostic, carrier-byte leakage (7 micro-items)
  • #2680 [A1-F07] Parse/execute interleave: ;-separated commands before a later syntax error still execute
  • #2714 [B1-11] Diagnostic prolog hardcodes bash instead of the argv[0]-derived name (owner decision: impersonation vs fidelity)
  • #2725 [B5-01] Interactive stdin driver swallows the rest of the stream after compound-opener parse errors, then kills the session
  • #2728 [B5-04] Exported-function (BASH_FUNC_*%%) import: wrong silence/diagnostic split and a laxer shape check
  • #2734 [B5-17] Interactive-route diagnostics carry a line N: segment GNU omits (and a spurious -c: segment on -i -c)
  • #2739 [B6-R1] Syntax error at a continuation position blames the previous command's line and drops the source echo
  • #2741 [B6-R3] if true then ...: GNU blames the closing keyword fi (then is consumed as a condition argument); rubash blames then
  • #2742 [B6-R4] while do done / `un...
Read more

v1.5.0

Choose a tag to compare

@github-actions github-actions released this 03 Nov 05:13
29bbf52

更新日志

所有重要的项目更改都将记录在此文件中。

格式基于 Keep a Changelog。

[1.5.0] - 2026-11-03

1.5.0 是 rubash 自 1.4.3 以来规模最大的一次发布:引擎对外开放了正式的
嵌入式 Session API 与原生调试会话核心,并完成了数百项与 GNU bash 5.3
的差分兼容修复(自 2026-10-22 起合并 560 个 PR)。同时按既定裁定移除了
winuxsh 时代的全部桥接名与产品 TOML 配置面(见「移除」)。

规模

本周期(2026-10-22 – 2026-11-03)的可核数字:

  • rubash:合并 PR 560 个;v1.4.3 → v1.5.0 diff 共 1,274 个文件,
    +268,679 / −12,490 行。
  • niubash(宿主):合并 PR 174 个;306 个文件,+79,063 / −20,829 行。
  • WinuxCmd(捆绑命令集):合并 PR 85 个 → 自身 1.2.1。
  • ruline(行编辑器):合并 PR 6 个 + 直接推送——全新的 GNU
    readline 兼容编辑器。
  • oh-my-niu(配套框架):合并 PR 7 个 → 自身 v2.1.0。

新增

  • 公开 Session API(嵌入式引擎契约)(#595/#1978):rubash::api
    发布 Tier A 契约——Session/SessionBuilder、运行结果与流控
    (RunOutcome/Flow)、第 5.3 节状态视图(变量、作业、选项、函数等
    只读视图)、能力 trait 与 SessionEvents 事件面;另有 Tier B 语法视图
    类型供工具侧读取解析结构。会话为显式单线程契约(一线程一 session)。
    niubash 已全量迁移到该契约之上。
  • 原生调试会话核心(#497):引擎内置调试 session(断点表、事件目录、
    停止快照与状态机),供宿主的 --debug 终端前端与 --dap 协议前端共用
    同一会话;含 WP-15 异常过滤与规范文件身份。定位是完整性与 API 验证面,
    行为面对脚本不可观察的部分与 GNU --debugger 的取舍一致。
  • expand_shell_words API(#2426):宿主可经 Session 直接取得一条
    命令行的分词展开结果(niu 的补全/高亮面消费)。
  • bash 5.3 动态变量 BASH_MONOSECONDS(#1649)。
  • 代码净行数统计脚本:仓库内置可复跑脚本,按「非空行、剔除 tests
    目录与 #[cfg(test)] 块」口径统计净源码行,并与 GNU bash 同口径对照
    (1.5.0 时点:rubash 净 292,309 行,GNU bash 5.3 净 162,815 行)。

修复

数百项 GNU bash 5.3 差分修复,按面归类(每项均先对照 GNU C 源码定
语义、并固化为带 issue 号的回归测试):

  • 展开与算术:$[...] 提取流与引号载体(#2374/#2375)、PIPESTATUS
    在算术面的所有权镜像(#2384)、case 模式以 \" 起头永不匹配
    (#2421)、参数展开子串/位置参数/数组算子族、关联数组交错访问、
    tempenv 标量遮蔽族、属性(declare/integer/array append)漏写路径族。
  • 解析与诊断:诊断令牌名与 GNU 逐字对齐(算术错误 token、未闭合
    引号、EOF 诊断)、case 双闭合与坏终止符拒绝、分组驱动的幻影复合帧、
    [[ =~ ]] 吸收闭合守卫、粘连 ; 前瞻。
  • fd 与重定向:进程继承 fd ≥ 3 的启动登记、fd 向外部子进程的交付
    族、关闭的 stdio 在子进程中保持关闭(#2378)、procsub 赋值物化与
    临时文件泄漏(#2388)、here-string 尾随换行、respawn 文本保真族
    (heredoc 延迟体队列、case 子句终止符落行,#2409/#2410/#2429)。
  • 作业、信号与 trap:全可陷信号覆盖、kill 多规格、异步 trap 表、
    子 shell 自杀路由、SIGINT 在 builtin sleep/管线中的丢弃语义、
    Ctrl+C 交互存活(GNU 信号处置 + DISCARD 展开)。
  • 内建与状态面:DIRSTACK 全门(元素赋值、index 0 拒绝、cwd 校验
    线程化、declare/local/tempenv 影子门,#2407/#2408/#2424)、POSIX
    登录门与 rcfile 直跑门(#2411/#2412)、bind 工厂键表与当前键图解析
    (#2386/#2387,含 set -o vi/emacs 的 editing-mode 绑定漏斗)、
    logout/suspend 登录态与参数面(巡猎批次)、--init-file/--rcfile
    的四道门控(#2436)。
  • 历史引擎面:history -p 返回码、HISTFILE unset 文案、时间戳
    显示形、stdin 非记录、GNU 时间戳读入。
  • locale:LC_COLLATE 参与 glob 排序与 [[ < ]]/[[ > ]]、UTF-8
    POSIX 字符类、严格 ERE 区间、setlocale 警告面。
  • 载体与多会话:多 session 止血三件(cwd 入 Session 状态、Executor
    Drop 的 env 回滚存活门、执行锁收窄到进程全局状态触点)、coproc
    生命周期与 jobs 显示、/dev/tcp 的 GNU 诊断形与服务名解析(Windows)。

性能

  • 数组 typed-cell 元素读、braced 未命中权威化、append 借用;解析器对
    普通命令的函数定义探测快速 bail;展开面 splits 短路与 freshness 门。
  • 性能口径:本版的对照数字以自有跨平台基准套件(shellbench)在发版
    终验批的同机同平台结果为准,Linux 与 Windows 数字分开标注,不混排。

移除

  • winuxsh 桥接名全清:WINUXSH_ROOT/WINUXSH_SHELL 等存量名字
    不再被读取或设置,~/.winuxshrc 不再被读(活名字为引擎的
    __RUBASH_SHELL_ROOT 与宿主的 NIU_ROOT/NIU_SHELL;WinuxCmd 集成
    面不在清除范围)。
  • 产品 TOML:引擎侧的产品 TOML 配置面删除,不保留 legacy 读取
    路径(构建清单 Cargo.toml 不在此列)。

文档

  • 进程身份投影(#1582):无 fork 模型下,$BASHPID 在平坦层为合成
    投影值、realized 层为真实 pid,$PPID 冻结规则与 GNU 一致;
    kill $BASHPID 按层内拦截语义工作。完整规则见状态视图文档。

附录 — 1.5.0 完整变更记录

以上为精选摘要。本附录按机制族给出本周期 560 个合并 PR 的完整分组
记录,一行一机制,标注承载 PR。

Session API 与调试器(契约面)

  • 1.5.0 Session API 契约在仓内发布:Tier A Session/SessionBuilder、
    状态视图、能力 trait、SessionEvents,Tier B 语法视图(#1986;
    RFC 与调试器设计定稿 #1535,#595/#497;API 台账 + niu 配对金丝雀
    #1536)。
  • 契约面补全:call_function_with_env 环境通道(#2357,#2001);
    InvocationShape 构造 + 环境边界清单(#2324;#2084/#2130);
    close_with_report 以值返回关闭边界状态(#2158,#2039);
    OptionsView 识别 flag-only 选项(#2148,#2040);Tier C executor
    接缝、inject_signal 文档对齐、kill 钩子降级(#1999);
    bind_readline_variable 宿主读探针(#2185,#2183);进程全局命令
    查找缓存按 session 切片(#2149,#2078)。
  • 调试会话核心分行建成:骨架——门、断点表、DebugEvent 目录、状态机
    (#1576);consult 接线——入口与断点处停止(#1878);§5.3 状态视图
    • 检查渲染(#1883);求值与写回(#1890);步进谓词 + 断点解析
      (#1886);三态闭合 + break/continue 词形(#1891);DAP 前端
      (#1892);CLI 前端、WP-15 异常过滤、规范文件身份(#1893);
      异常点生产者(#1924);断点条件只报告一次且不能杀死被调试进程
      (#1979,#1962);函数值 DEBUG consult 改读接缝到达快照(#2037,
      niubash#681);--debug 会话的宿主自带启动文件(#2095,
      niubash#692);CLI 前端的宿主词与裸名 hover 值(#2354);
      --debugger 运行 bashdb 启动器并按 GNU 方式降级(#1191);
      --debug 武装 extdebug(#1192);bashdb 夹具在 CI 中自上游
      bash-5.3 构建(#1507),harness 普查清零(#2224,#2190)。

fd 与重定向(经审计的机制族)

  • {var} 描述符线收敛到一个演进中的描述符空间、由全部 applier 步行
    共享(#2619,#2612,吸收 #2607);生产者 {var} dup 钉优先级
    (#2604,#2599);复合作用域撤销覆盖 {var} 关闭(#2617,#2614);
    stage {var} 绑定经共享 applier 空间交付(#2628,#2613)。
  • fd 接缝批 #2589–#2591(#2592);fd 路由批(#2566;#2552/#2562);
    fd 表三面 #2530/#2531/#2532(#2561);载体恢复交叉(#2559,#2521)。
  • stage 交付:stage-0 在已解析描述符上交付 + 出生即关闭的 fd 0 种子
    (#2515;#2502/#2503);stage 上下文 fd 3 交付(#2519,#2484);
    单 shell stage 管线在真管道上流式运行(#2516,#2483);管线 stage
    经共享外部路径施加各自重定向(#2262,#2255);≥3 级管线中 stage-0
    编号绑定(#2289,#2255);fd 钉赢得 stdio 残留占据的槽位(#2284,
    #2255);stage 孵化器 stdio-dup 通道 + shell-writer 生产者 stderr
    路由(#2299;#2293/#2294)。
  • spawn 交付族:{fd} 变量形重定向全种类 spawn 交付(#2277);简单
    命令面的编号 stdio dup(#2290);编号 fd heredoc 向外部子进程交付
    (#2271,#2270);编号 <> 重定向以 O_RDWR 交付(#2301);编号
    /dev/null 交付 + BASH_SOURCE 裸名解析(#2312;#2304/#2302);
    foreign-spawn 等待后 dup 目标截断修复(#2377,#2368);exec 接管道
    stdin——临时载体泄漏 + 重定向丢失(#2400,#2395);子脚本 <> 读写
    对绑 fd 0(#2267);函数调用 <> fd 0 写端建模(#2260)。
  • /dev/fd 与别名面:写模式 /proc/self/fd/N 打开的互补管道端
    (#2470);/dev/fd 别名打开普通文件时全新重开(#2275,#2256);
    别名输出面——外部 stdio 计划 + 编号/stage 交付(#2297;
    #2285/#2295);别名拼写门按 at 位置端点裁决(#2326,#2316);
    stage-0 fd 别名管线不再抽干被别名描述符(#2028,#2003);
    fd_alias_target 数字字段规范十进制(#1988,#1973)。
  • 注册表与治理:fd 注册表服务面族——describe/内省/分发共用一个注册
    表(#2015;#1898–#1974 线);特殊路径注册表 + 打开阶梯收敛(VFS
    S1+S2,#1906);分发表与内省面自注册表投影(#2080/#2075/#2083/
    #2085,#2036 S1–S5);单一命令名注册表、纯数据(#2050,#2036);
    File 条目的镜像治理 + 子进程 /proc fd 视图隔离(#2180;
    #2170/#2171);进程内 dup 源按列表位置解析(#2330,#2314);脚本面
    fd_var dup 对命令自身绑定再解析(#2321,#2310);待决 {fd} 关闭
    列表在进程内与脚本面的位置(#2367,#2322)。
  • 启动与继承:进程继承的 fd ≥ 3 在启动时登记(#1562,#1557);环境
    /命令 fd 向子进程交付(#1783;#1686–#1688);关闭的 stdio 在子进程
    中保持关闭(#2420,#2378);环境 /dev/full 绑定交付(#2555,
    #2550);捕获路径子进程 stdio 丢失(#2542,#2522);procsub 体
    重印中 {var}+算子邻接保持(#2569,#2522);ENOEXEC 脚本子进程 fd
    作用域(#2291,#2279);路由拒绝后 spawn 捕获记录存活(#2264,
    niubash#729)。
  • 重定向语义批:关闭的 stdout 的 dup 在重定向设置期失败(#1448);
    < file 与 <<< 并存时最后一个 stdin 重定向胜出(#1431);重定向
    设置副作用、关闭 fd 目标、exec 持久关闭/移动(#1666);#1665 无输出
    builtin 的 fd≥3 重定向打开(#1770);歧义重定向字段计数门
    (#1780,#1769);extglob 歧义重定向(#1764,#1673);POSIX 特殊
    重定向失败退出(#2112,#2082);缓冲 builtin 路由校验注册表类输入
    重定向(#2051,#1968)+ 残余输入重定向钉(#2088);cat 对
    > f1 > f2 + heredoc 建全部输出文件(#1432);复合重定向在入口
    一次绑定(性能,#2268);绑定层错误通道对(#2055;#2024/#2030);
    fd 注册表残余分诊(#2089,#2042)。

进程替换与协程

  • procsub 流式化:输入 procsub 流式而非物化(#1954,#1952);操作数
    默认字节级正确抽干,fifo 标记路由置于证明键之后(#2485,#2473);
    argv 词经 #1903 fifo 标记交汇流向外部子进程(#2156,#1959);
    生产者在全部平台继承环境 std 流 fd(#2504,#2492);消费者 argv 词
    标记交付按消费者类别设门(#2228,#2225);输出 procsub 馈送在
    进程生命结束前完成(#2182,#2179);管线 stage 输出 procsub 交付
    (#2194,#2184);列表级输入 procsub 物化(#2253,#2235);
    procsub 消费者与 coproc 的 spawn 时 fd 状态(#2232;
    #2195/#2196/#2200);procsub 生产者与 coproc respawn 处的 BASHPID
    起源播种(#2243)。
  • procsub 语义残余:赋值物化(#1575,#1561)与定稿(#1550,#1523);
    复合 procsub 赋值(#1793,#1690);临时文件泄漏(#2419,#2388;
    #1793,#1691);>(...) 消费者以分离异步子进程运行(#1293);

    (exit N) 只结束替换子进程(#1267);写侧 >(...) 接受 { …; } 体
    (#1315);真实 pid 占位符 + 真实行号(#1122);原始 <(...) 馈送
    下的 TMOUT 裁决(#1521,#1141);抽干面——varredir 关闭完成 +
    端点读税(#2017;#1646/#1951)。

  • coproc 生命周期:回收/处置拆分——只在 GNU 处置点退役(#2122);
    死 coproc 在命令边界解绑 NAME/NAME_PID(#1198);$! 进程保真——
    简单外部命令直 spawn(#2019,#1584);dup 输出重定向按 >&2 兑现
    (#1985,移植 #1695);here-string/heredoc stdin 兑现(#1694,
    #1651);命令位置的 '!' 为语法错误(#1693,#1652);coproc time
    是普通词(#1698,#1653);简单体在 jobs 显示中省略名字(#1699,
    #1645);赋值 bang 准入(#2013,#1983);stderr 接缝——子进程直
    接 fd-2 端点 + 启动 SIGPIPE 策略(#1884,#1882);mapfile 经字符串
    通道读 coproc fd(#1696,#1659)。

作业、信号与 trap

  • fg/bg 恢复与 %jobspec kill 均经 killpg 交付到作业自身的进程组
    (#2623,#2622;#2625,#2624)。
  • 作业条目生命周期:wait 保留 + 已停止作业警告面;disown -r 只动
    运行中作业;已停止作业的 disown(#2568;#2529/#2539;#2494;
    #2488/#2489;#2505,#2496);jobs 面——子 shell 启动通知门、suspend
    单代停止(#2231;#2214/#2203);后台管线 pgrp 守卫钉(#2288,
    #2287);异步非括号 & 体下沉一个子 shell 层(#1249);歧义 %?pat
    jobspec 报错(#1437,#1302);作业状态观察时机(#1705,#1586)。
  • 前台停止检测:WUNTRACED 等待 + tcsetpgrp 交接(#2406,#2398);
    作业控制进程组 + 组投递 SIGINT(bats CTRL-C 族,#2251);交互
    Ctrl+C 存活——GNU 处置 + DISCARD 展开(#1809,#1662);fg-wait
    SIGINT 存活(#1414,#1250);等待中未陷 Ctrl+C 不再杀死交互会话
    (#2145,niubash#698);builtin sleep 后被陷 SIGINT 不再吞掉下一
    行(#1821,#1811);builtin sleep/管线中的 SIGINT 丢弃语义
    (#1784 批)。
  • 信号覆盖与处置:全部可陷信号均装 trap(#1527,#1511);被陷停止
    类信号 + SIGCONT 装处理函数(#2350);trap 重置处置路径——翻转后
    重装 + SIGINT REVERT 特例(#2349;#2348/#2347);入口忽略按信号
    号在启动时键控(#2198,#2193);trap/kill 列表的实时条目 + 异步
    入口忽略(#1094);kill 多规格 + 信号名大小写不敏感 + -l -s
    参数面(#1784;#1429);保留死作业的 jobspec 步行(#2399,
    #2381);kill %1 TERM 处置泄漏 + fg SIGINT 转发(Android,#1996;
    #1990/#1991);suspend 门键于 job_control 变量(#2498);SIGHUP
    结算——ctty 获取、termsig 漏斗、huponexit(#2254);EXIT trap 后以
    致命信号死亡(#2351,#2346);EXIT trap 入口状态 + 祖先通道
    SIG_DFL 死亡(#2371;#2352/#2353);嵌套 rubash 子进程信号死亡
    不再杀死外层 shell(#2248);未陷致命信号持久化 exit_code、中断的
    外部命令被杀(#1447);管线阻塞等待轮询信号邮箱(#2049,#2020);
    suspend 线程定向停止按目标 OS 设门(#1579)。
  • trap 语义:致命 -e 展开跳过函数收尾的 trap 恢复——DEBUG 过报修复
    (#2548,#2546);退出展开不做 ERR 裁决(#2512,#2482);致命展开
    栈 + 管线内 ERR 面(#2506,#2482);die-trap 序列化损坏 + 静默 die
    路径(#2545;#2493/#2480);整体 comsubst/管线调用中的 EXIT、全局
    RETURN、无挂起 return(#1155);RETURN trap 中的 break/continue
    不泄漏到调用方循环(#1441);break/continue 自 ERR trap 传播
    (#1439);复合重定向下 trap 可见 $BASH_COMMAND/$BASH_SOURCE 真值
    (#1875,#1872)。

展开、变量与算术

  • 间接/位置族:间接变换中的位置保持者(#2609,#2608);下标参数 :?
    预扫描双重求值修复(#2593,#2558);取值/状态面 #2527/#2528
    (#2554);${!prefix@} 复合扇出(#2415 面);内嵌 @ 切片按 GNU
    @ 列表切分(#1032);展开结果在 mut 词步行器(#2215,#2210)与
    expand_word(#2226 面)中受保护。
  • 参数展开片:子串/位置/数组算子 + 急切绑定(#1701;
    #1588/#1597/#1598/#1600/#1601);展开批 #1...
Read more

v1.4.3

Choose a tag to compare

@github-actions github-actions released this 22 Oct 08:22

What's Changed

Full Changelog: v1.4.2...v1.4.3

v1.4.2

Choose a tag to compare

@github-actions github-actions released this 21 Oct 12:47
25b0850

What's Changed

  • test(regression): #812 pin suite TMPDIR under a space-free scratch anchor by @caomengxuan666 in #864
  • docs(hygiene): #849 注释/坐标漂移清扫 + #768 README byte-identical 措辞(closes #849 #716 #768 #767) by @caomengxuan666 in #865
  • fix(builtins,executor): #704 printf numeric validation (R6.1), command -v no-operand + substitution status (R6.2 residue) by @caomengxuan666 in #869
  • fix(executor,builtins): #773 fd table capped at 1014 with a bogus EINVAL — capacity now follows ulimit -n soft, exhaustion reports EMFILE by @caomengxuan666 in #870
  • fix(executor): mark_quoted_ifs_from_raw recognizes markers.rs carrier bytes (#868) by @caomengxuan666 in #874
  • fix(executor): clamp the $() and backtick raw-skip copy loops to the buffer (#875) by @caomengxuan666 in #877
  • fix(executor): mark_quoted_ifs_from_raw applies quoted-IFS marks on the recorded byte-offset basis (#876) by @caomengxuan666 in #882
  • fix(assoc): #860 unset empty-span/mask pseudo-diagnostic + #861 kvlist self-read miss by @caomengxuan666 in #883
  • docs: #716 repoint dangling TASKBOARD references to git history by @a-rookie-of-C-language in #886
  • fix(builtins,executor): #866/#867 — unforgeable background-wrapper handshake + expected-parent PDEATHSIG race check by @caomengxuan666 in #873
  • fix(executor,builtins): #872 fd-table nits — move_to_high_fd comment + single-source fd defaults + drop dead field by @a-rookie-of-C-language in #885
  • fix(builtins): #859 — pushd -n with no operand is a silent no-op (rc 0), not the swap arm by @a-rookie-of-C-language in #889
  • test(audit): #713 probe stdin EOF + refresh last-run line by @a-rookie-of-C-language in #904
  • fix(executor): #846 - ! no longer flips a compound's own redirect failure by @a-rookie-of-C-language in #902
  • fix(printf): #871 recognize glibc strtod inf/nan word prefixes in %f/%e/%g by @a-rookie-of-C-language in #899
  • fix(executor): #858 — \ must restore the word-internal comsub \True overlay by @a-rookie-of-C-language in #891
  • fix(executor): #850 — fold /cygdrive//... to the drive letter for in-shell faces by @a-rookie-of-C-language in #893
  • fix(executor,builtins): #873 wrapper respawn carries the handshake argv flag only when the host CLI consumes it by @caomengxuan666 in #906
  • fix #896: pushd dash family follows GNU option walk by @a-rookie-of-C-language in #901
  • fix(console): no visible console window for console-less runs (niubash#451) by @caomengxuan666 in #909
  • fix(expand): unset scalar base has no element 0 for operators by @caomengxuan666 in #910
  • fix(login): report login_shell shopt as on for login shells by @caomengxuan666 in #911
  • perf(expand): byte-wise case transform for ASCII pattern-less ops by @caomengxuan666 in #912
  • test(regression): arm the #761 guards and promote lim-f5-fd-cap (#761, #773) by @caomengxuan666 in #908
  • chore: #905 pin *.py eol=lf + renormalize CRLF-committed probe script by @a-rookie-of-C-language in #907
  • docs: #892 contributor conventions written down (oracle, probes, env, full suite, GPL, process) by @a-rookie-of-C-language in #903
  • fix(console): adopt single hidden console per detached session (niubash#462, niubash#451) by @caomengxuan666 in #913
  • perf(shopt): don't materialize default-equal state, keep fast lookup path by @caomengxuan666 in #915
  • fix(executor): inline tput arm — Windows-only whitelist answers byte-equal to GNU ncurses (#800 face A) by @caomengxuan666 in #884
  • perf(env): gate the process-env mirror on special names (#916) by @caomengxuan666 in #917
  • perf(env): write-behind marker strings, read from structured flags by @caomengxuan666 in #918
  • perf(array): typed-cell reads with dirty-flag invalidation (#914) by @caomengxuan666 in #919
  • perf(export/unset): single-probe mirror, gated env fallback, bulk unmark (#916) by @caomengxuan666 in #920
  • perf(dispatch): hoist case word, merge test Vecs, memoize at-join by @caomengxuan666 in #921
  • perf(arith): single-static parse cache for CmpLT + PostInc by @caomengxuan666 in #922
  • perf(array): drop redundant mirror clone on element read path by @caomengxuan666 in #923
  • perf(array): hoist typed-cell read before mirror clone on element path by @caomengxuan666 in #924
  • perf(for-arith): counter fast driver for canonical counting loops by @caomengxuan666 in #925
  • test(cli): interleave typed-cell matrix across builtin writes by @caomengxuan666 in #926
  • test: land semantic-edge regression suites (test/shift/arith) by @caomengxuan666 in #927
  • test: vendor oils spec cases for arith/bracket/array/assoc by @caomengxuan666 in #928
  • test: dirty-flag unit + integration semantics by @caomengxuan666 in #929
  • perf(test): whitelist fast path for pure-decimal comparisons by @caomengxuan666 in #930
  • perf(arith): AddAssign cache slot for x+=i / x+=1 by @caomengxuan666 in #931
  • perf(assoc): typed-cell read for single-element assoc lookups by @caomengxuan666 in #937
  • docs(readme): #768 — split byte-identical into raw + env-classified + clean (zh-CN synced) by @caomengxuan666 in #932
  • docs: #878 CR nits rework — correct command.def/printf.def coordinates (#888 review) by @caomengxuan666 in #933
  • fix(printf): #879 PR #900 review rework — hex window pexp, denormal guard, decimal window, '0' on inf/nan by @caomengxuan666 in #935
  • fix(executor,lexer): #880 rework -- close the two PR#898 review blockers by @caomengxuan666 in #936
  • audit(713): third nested-context pass — 56 probes, #934 faces pinned, $0-spelling normalized by @caomengxuan666 in #941
  • build(provenance): stamp -dirty- of the worktree diff into the version banner (rubash#827) by @caomengxuan666 in #939
  • fix(script-entry): escape literal marker-zone chars in script text — isolated U+E000 passthrough (#856) by @caomengxuan666 in #946
  • fix(executor): E400-aware sentinel decode family for marker output boundary by @caomengxuan666 in #947
  • test(regression): #746 catalogue second batch + manifest exhaustiveness gate by @caomengxuan666 in #944
  • test(regression): flip issue-879 catalogue row to must-match (rubash#949) by @caomengxuan666 in #950
  • perf(array): negative-literal subscript fast lane via typed cell by @caomengxuan666 in #942
  • perf(shift): offset-window positional params, drop per-shift clone+drain by @caomengxuan666 in #954
  • perf(expand): literal-word fast path in expand_word_mut + command words by @caomengxuan666 in #956
  • fix(reader): end grouped gather at a stray close inside an open group (niubash#482) by @caomengxuan666 in #955
  • chore(vendor): bump third_party/bash to Bash-5.3 patch 20 (9c465866) (#895) by @caomengxuan666 in #957
  • fix(executor,cd): bare drive designator D:/cd D: converge on the engine dispatch by @caomengxuan666 in #953
  • fix(main): -c operand marker-zone entry escaping — respawn exclusion is double-escape only (rubash#948) by @caomengxuan666 in #952
  • perf(case): render head-only for $BASH_COMMAND, lazy word_chars, gated debug-trap head by @caomengxuan666 in #958
  • perf(array): decimal-subscript write fast lane, alloc-free mirror append by @caomengxuan666 in #959
  • perf(assoc): trim per-op fixed costs on the write fast lane (#618) by @caomengxuan666 in #960
  • fix(executor): sync typed assoc cell on nameref element assignment (#961) by @caomengxuan666 in #962
  • perf(assoc): skip discarded whole-word pass on side-effect-free element writes by @caomengxuan666 in #963
  • fix(executor): sync typed cells on parameter default-assign + compound-append; add coherence verifier by @c...
Read more

v1.4.1

Choose a tag to compare

@github-actions github-actions released this 19 Oct 08:10
45f537e

rubash 1.4.1

1.4.1 是 1.4.0 的健康重发:1.4.0 的发行资产曾被审计发现构建自浮动克隆的错误源码状态(#827)——1.4.1 起发行链把引擎源锁到精确 commit(失配即失败),脏构建会在 niu --version 里自曝。建议所有 1.4.0 用户升级。

行为修复(引擎)

  • ERR trap 嵌套语义:嵌套子壳过火/扁平函数体欠火/return 归因三面与 GNU bash 5.3 逐字节一致(#720,17 例差分回归)
  • patsub 替换文本转义:替换文本中的用户 PUA 字符不再与内部标记碰撞(v=abc; r="${v/b/$'\uE312x'}" 类形态修复)(#843)
  • 下标 ANSI-C 双态法则:$'...' 在双引号内不再被错误解码;unset 的带引号下标操作数按 GNU 引号移除语义解析(#847)
  • pushd/popd:readonly OLDPWD/PWD 检查对齐 GNU(失败栈不弹 rc 1);越界报错引用真正越界的词(#844/#848)
  • ${var@P}:prompt 变换不再泄漏命令替换状态到后续 $?(#813)

工程与发布

  • 发行 tag 自动化扩展到补丁版(此前 x.y.1+ 无自动化通道);crate 包增加构建变体目录护栏(#851/#862/#863)
  • 快照真相钉死:GNU bash 自身竞态(nameref)与交互续行语义的回归锚(#845/#852)

质量

  • 全量 GNU 上游 83 套语料持续 100% 通过(82 套逐字节一致);每项修复带双向差分证据与独立代码评审

完整变更清单见仓库 CHANGELOG 与各 issue/PR。1.4.0 → 1.4.1 的引擎语义差异同步进入 niubash 1.4.1(下个发布)。

v1.4.0

Choose a tag to compare

@github-actions github-actions released this 13 Oct 11:35
f69e790

What's Changed

  • fix(env): skip invalid-identifier env names like GNU bash 5.3 (niubash #102) by @caomengxuan666 in #106
  • fix(xtrace): complete G16 - single raw (( )) trace, for/case heads, assignment prefix by @caomengxuan666 in #107
  • fix(assignment): restore \x18 escaped-quote carrier in quoted-assignment fast path (niubash #103) by @caomengxuan666 in #108
  • fix: land local master batch — heredoc warnings, arithmetic messages, ifs multibyte, printf locale, raw-byte markers, let $var by @caomengxuan666 in #110
  • fix: niubash #106/#107/#108 regressions + restore #103 array fix lost in rescue merge by @caomengxuan666 in #111
  • fix(cli): expand bundled short options containing -l/-i with -c by @caomengxuan666 in #112
  • fix(eval): render the data-double-quote marker back to source before re-parsing by @caomengxuan666 in #114
  • fix(capture): strip a CRLF terminator from command-substitution output (niubash #120) by @caomengxuan666 in #115
  • fix(lexer): 函数定义/花括号组同行 # 尾注释解析失败(#118) by @caomengxuan666 in #119
  • test(executor): pin GNU exit-unwind semantics through AND-OR lists by @daiaji in #122
  • fix(executor): cmdsub child drops inherited fd-1 binding by @daiaji in #123
  • fix(utf8): stop widening payload bytes in [[ =~ ]] RHS and compound xtrace by @daiaji in #124
  • chore: bump to 1.2.1 by @caomengxuan666 in #366
  • fix: sync Cargo.lock to 1.2.1 by @caomengxuan666 in #367
  • fix(windows): preserve backslashes before quotes in forced-quoted argv by @I-Want-ToBelieve in #442
  • fix(windows): normalize prefix TMPDIR at native child boundary by @Uarz in #446
  • ci: community bots — stale 清扫(豁免 P0/P1)+ 首次贡献者问候 by @caomengxuan666 in #450
  • fix(cat): open the redirect target once in the streaming cat paths by @bbvdf in #447
  • fix(ulimit): compile against musl and OpenHarmony libcs by @caomengxuan666 in #449
  • fix(parser): 赋值前缀 + 子 shell — GNU 形态(审计语料 #452 集群1) by @caomengxuan666 in #453
  • complete: accept dashed function names in -F (fixes #427) by @caomengxuan666 in #454
  • fix(executor): broken-pipe writes no longer abort the interpreter (rubash#440) by @caomengxuan666 in #455
  • fix(android): compile against bionic for aarch64/armv7 android targets by @caomengxuan666 in #456
  • test(source): pin sourced exit N shell-termination semantics (rubash#426) by @caomengxuan666 in #457
  • fix(input): normalize C0 control bytes on bridge-delivered interactive lines by @caomengxuan666 in #458
  • test(parser): pin GNU semantics for tokens on the function-definition brace line (rubash#443) by @caomengxuan666 in #459
  • test(parser): pin #424 redirect-target rejection and procsub input-side regressions by @caomengxuan666 in #464
  • fix(executor): keep quoted whole-word default expansions one compound element by @caomengxuan666 in #466
  • fix(trap): do not fire the ERR trap for word/assignment expansion errors by @caomengxuan666 in #467
  • fix(executor): pass process-substitution fds to external command arguments on Unix by @caomengxuan666 in #468
  • fix(executor): coproc 子进程继承父函数表快照,DEBUG trap 函数可解析 (fixes #441) by @caomengxuan666 in #469
  • ci: greet 输入改 snake_case,first-interaction 真正生效(镜像 niubash#224) by @caomengxuan666 in #470
  • ci: greet 输入改 snake_case,first-interaction 真正生效 by @caomengxuan666 in #471
  • fix(path): translate /mnt/X drive argv for every child class (niubash#164) by @caomengxuan666 in #444
  • fix(lexer): nested keyword-form function bodies count as group openers in skip_brace (fixes #465) by @caomengxuan666 in #472
  • fix(parse): =~ regex word fragments are word data, never reserved words (fixes #461) by @caomengxuan666 in #473
  • fix(lexer): raw-byte tag a word-initial data ESC (niubash#200) by @caomengxuan666 in #474
  • fix(parser): accept terminator-less then/do after ]] and (( )) in compound bodies by @caomengxuan666 in #475
  • fix(parser): accept function-def name words containing unquoted $( ) (#462) by @caomengxuan666 in #476
  • docs: 归档过时状态快照文档(7 个)+ CHANGELOG 补 #455/#456/#458 by @caomengxuan666 in #478
  • fix(prompt): strip [ ] ignore-markers on every PS1 render path by @caomengxuan666 in #480
  • fix(source): source 边界上的语法错误中止降级为 reader discard,不再终止会话(#451 类 B) by @caomengxuan666 in #481
  • feat(repl): raw-console readline editing for the standalone interactive shell (rubash#419 readline leg) by @caomengxuan666 in #482
  • lexer: join lines while a word-attached procsub body is open (fixes #463) by @caomengxuan666 in #483
  • perf(executor): single-handle cd/pwd comsub path resolution (rubash#375) by @caomengxuan666 in #484
  • perf(lexer): opener-state checkpoint - fold passes resume from the bare { (rubash#281) by @caomengxuan666 in #486
  • feat(startup): login shell chain /etc/profile -> ~/.bash_profile family (#487) by @caomengxuan666 in #489
  • feat(cli): --version appends build hash/profile and a Windows persona note (rubash#488) by @caomengxuan666 in #490
  • fix(executor): propagate command-substitution status to in-word $? (rubash#485) by @caomengxuan666 in #491
  • audit(platform-cfg): full platform-gate inventory; fix android signal-table legs (kill/trap) by @caomengxuan666 in #492
  • fix(executor): comsub reap publishes its status to $? before the enclosing command runs (rubash#485) by @caomengxuan666 in #494
  • docs: README style pass (minimal, fact-preserving) by @caomengxuan666 in #495
  • chore(release): prepare 1.4.0 — version bump, CHANGELOG, packaging slim-down, release notes draft by @caomengxuan666 in #498
  • tests/regression: re-baseline stale suite snapshots + airtight snapshot env + CI golden-refresh artifact by @caomengxuan666 in #496
  • cross-platform: gate residual Windows assumptions outside cfg(windows) + stale doc claims by @caomengxuan666 in #499
  • docs(readme): evidence-first restructure with cross-platform identity (EN+zh) by @caomengxuan666 in #500
  • perf(executor): hot-path residue — test marks gate, word materialization once, assignment scan admission (rubash#242) by @caomengxuan666 in #501
  • docs: repoint deleted COMPATIBILITY-STATUS.md references to the current ledger by @caomengxuan666 in #502
  • docs(ledger): GNU suite 83/83 — nameref residual proven to be GNU's own coproc reap race by @caomengxuan666 in #506
  • [P0] fix(#511): cat inline path re-expands already-expanded argv - silent wrong-file read by @caomengxuan666 in #552
  • fix: four P1-high semantic divergences - errexit body adjudication, stdin parse-error status, printf write-failure status, dirstack EX_USAGE by @caomengxuan666 in #553
  • fix(pwd): PWD family unconditionally POSIX // form — retire the native-PWD style hatch (#537) by @caomengxuan666 in #556
  • fix(#553): compound's own failed redirection fires ERR again - unblock redir snapshot by @caomengxuan666 in #557
  • [P0] fix(#555): mkdir/touch/cp/rm/rmdir re-expand already-expanded argv - silent wrong-path corruption by @caomengxuan666 in #558
  • perf(lexer): parse-throughput construction wins - fold-before-push, gated leading_ws capture, TokStr reader state (rubash#241) by @caomengxuan666 in #554
  • fix(shim): forward the sh invocation name so the host honors its GNU contract by @caomengxuan666 in #504
  • fix: Wave2a shell semantics batch - SIGQUIT policy ignore, -r entry via -s, readonly attr refusal, declare -na shape wins, ERR single-fire guard by @caomengxuan666 in #560
  • P1 Wave1: six semantic fixes (#524 #525 #529 #532 #535 #536) — trap exit unwind, pipeline redirect failures, indirect declared-unset, runtime bad substitution, redirect-word nounset, malformed subscripts by @...
Read more

v1.2.0

Choose a tag to compare

@github-actions github-actions released this 15 Sep 10:10

What's Changed

  • fix(exec): capture external child stdout inside builtin pipeline stages (niubash#93) by @caomengxuan666 in #102
  • fix(path): /tmp and /var/tmp resolve to per-user temp even with shell root by @caomengxuan666 in #103
  • fix(expansion/pipeline/invocation): four fast-path fidelity bugs found via differential testing vs GNU bash by @SuperYogurt in #101
  • fix(comsub): keep fragment bytes byte-exact through field materialization (niubash#92 follow-up) by @caomengxuan666 in #104
  • docs(readme): sync compatibility numbers to the 2026-09-14 ledger by @caomengxuan666 in #105

New Contributors

Full Changelog: v1.1.0...v1.2.0