Merge nucleic/sleek-thistle-egret-fyej into dev

This commit is contained in:
2026-07-18 05:19:31 -07:00
commit 1cce71f10b
11 changed files with 3371 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
# 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` → bash `a b c`, nash `a`.
- **Root cause**: brush applied IFS splitting to *literal* words, not just
expansion results: under `IFS=,`, `echo a,b,c` printed `a b c` (bash:
`a,b,c`) and `set -- a,b,c` received 3 args (bash: 1). POSIX/bash split only
the results of parameter/command/arithmetic expansion. Mechanically,
`brush-core/src/expansion.rs` had a two-state `ExpansionPiece`
(`Splittable`/`Unsplittable`) conflating "field-splittable" with
"glob-active", and literal text was marked `Splittable`.
- **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 in
`expansion.rs`). Corpus back to 100% (94/94); candidate for upstreaming.
- **Regression tests**: corpus `ifs-split` (+ `glob-all`, `glob-txt`,
`cond-pattern`, `case` guard the glob/pattern side); brush compat suite.