Thicket thicket
cambridge
REPOS 4

March 2026

Merry has been gaining the building blocks that make it a practical target for porting existing shell scripts. In recent commits, the shell now supports a return command that lets a function exit with a specified status code, a local command for function-scoped variables, and loop-control keywords including continue and return. Together these mean scripts can use functions as subroutines that signal success or failure, keep intermediate state private, and break out of loops or functions early. Commit

A new read built-in lets a script capture a line from standard input into named variables, opening up the familiar while-read pattern for processing input line by line. Case statements also now expand variables inside their patterns, so a pattern referencing a variable matches against the variable's value rather than the literal name. Backslash escapes in read input are not yet handled, so escaped characters pass through literally. Commit

Several parser and expansion fixes bring Merry's behaviour closer to standard sh: tilde-prefixed paths now expand to the home directory, unquoted words split on the shell's internal field separator rather than only spaces, and the trap command accepts numeric signal identifiers alongside named ones. Building Merry now requires the external globlon package for filename pattern matching, replacing a previously bundled implementation. Commit

W13.2026 · 23–29 MarAll

Merry now supports reading lines from standard input into variables and recognises loop-control keywords, making it more practical for writing shell scripts. Building Merry also requires the external globlon package for filename pattern matching.

Features

  • Input reading: A new read built-in lets a script capture a line from standard input into named variables, enabling a while-read loop to process input line by line. Backslash escape sequences are not yet handled, so escaped characters in the input pass through literally. Commit

  • Loop control: The shell now recognises continue and return, so a script can skip to the next iteration of a loop or exit a function early. These are non-POSIX extensions, so scripts that rely on them will not port to strictly POSIX-compliant shells. Commit

  • Case pattern expansion: Pattern words in case statements now undergo variable expansion, so a pattern that references a variable matches against the variable's value rather than the literal text of the variable name. Commit

Fixes

  • Tilde expansion: A path beginning with a tilde and slash, such as ~/documents, now expands to the user's home directory instead of being treated as a literal filename. Commit

  • Field splitting: Unquoted words are now split on the IFS variable (the shell's internal field separator, defaulting to space, tab, and newline) rather than only on spaces, so scripts that set a custom separator will behave as expected. Commit

Compatibility

  • Globlon dependency: Filename pattern matching now uses the external globlon library in place of a bundled implementation, so building Merry requires that package to be installed. Commit