1.4 KiB
1.4 KiB
nash ↔ bash divergence log
Live record of behavioral divergences found by the replay harness
(replay.py, corpus in corpus.jsonl). Per docs/NASH.md §10.3/§11, each entry
stays open until fixed in the fork (or upstream) and re-verified by the corpus.
Open
(none)
Closed
D1 — IFS word-splitting applied to literal words (fixed in fork)
- Found: M0 corpus run (
ifs-split), brush-shell-v0.4.0. - Repro:
IFS=,; set -- a,b,c; echo $1→ basha b c, nasha. - Root cause: brush applied IFS splitting to literal words, not just
expansion results: under
IFS=,,echo a,b,cprinteda b c(bash:a,b,c) andset -- a,b,creceived 3 args (bash: 1). POSIX/bash split only the results of parameter/command/arithmetic expansion. Mechanically,brush-core/src/expansion.rshad a two-stateExpansionPiece(Splittable/Unsplittable) conflating "field-splittable" with "glob-active", and literal text was markedSplittable. - Fix: added a third piece state
LiteralText(never field-split, glob chars active) and produce it for unquoted literal text, the no-expansion-chars fast path, and retained-backslash escapes (// nash:markers inexpansion.rs). Corpus back to 100% (94/94); candidate for upstreaming. - Regression tests: corpus
ifs-split(+glob-all,glob-txt,cond-pattern,caseguard the glob/pattern side); brush compat suite.