Thicket thicket
cambridge
REPOS 4

June 2026

Merry received a batch of pipeline fixes over the past few weeks that address several ways multi-stage pipelines could stall or crash. A long-running command in one stage no longer blocks the remaining stages, loops in one stage no longer prevent other stages from progressing, and each stage now closes its read end when it finishes so file descriptors stop accumulating. Together these changes mean long-running scripts that pipe through multiple commands will complete instead of hanging or exhausting system limits. 1d0e955a e640f4ad

The shell also closed several gaps with POSIX behaviour. Variables prefixed with a dollar sign now work inside arithmetic expressions, tilde shortcuts for home directories resolve correctly, double-quoted strings unescape backslash sequences as expected, and trap handlers queue their actions so signals arriving during a script are no longer silently dropped. If you have shell scripts written for a standard POSIX shell, they should now run without modification. 848ec3f7 f56e54db 77c2b3d8 605a9466

A small performance improvement reduces the overhead of environment lookups and pipeline setup, so scripts complete in less time. c552593f

W26.2026 · 22–28 JunAll

Merry, a POSIX shell, received six fixes this week that make quoting, arithmetic, and signal handling behave as the standard requires. A separate change also reduces the time scripts take to run.

Fixes

  • Quoting: Double-quoted strings now unescape \" and \\ correctly, so scripts that embed literal quotes or backslashes inside double quotes produce the expected output. This matches the behaviour of sh and other POSIX shells. 77c2b3d8

  • Pipes: Each stage of a pipeline now closes its read end, so long-running scripts no longer accumulate unused file descriptors. This prevents hitting system file-descriptor limits in scripts that open many pipelines. e640f4ad

  • Arithmetic: Expressions inside $((...)) are now parsed correctly, and when one fails the error message includes the line and column number. This makes it straightforward to locate a typo in a complex arithmetic expression. 17b2f1b7

  • Signal and trap handling: Trap handlers now queue their actions and run them at defined poll points, so signals that arrive during a script are no longer silently dropped. Merry also recognises SIGPIPE (the signal sent when a pipe's reader closes) and passes the correct context to EXIT handlers, so cleanup code runs with the right environment. 605a9466 f18ac7c7

  • Subshells: Running exec inside a subshell now spawns a child process rather than replacing the shell. The parent script continues after the subshell finishes instead of being terminated. c0115a10

Compatibility

  • Performance: Merry now handles environment lookups and pipeline setup with less overhead. Scripts complete in less time. c552593f 91fc4233