[Toybox] Shell Compatibility Reports from Oils - ~800 tests passing
Andy Chu
andychup at gmail.com
Thu Jun 26 21:33:49 PDT 2025
Hello!
I compared many shells for bash compatibility, including toysh:
https://pages.oils.pub/spec-compat/2025-06-26/renamed-tmp/spec/compat/TOP.html
toysh passes 809 tests, out of ~2200:
https://pages.oils.pub/spec-compat/2025-06-26/renamed-tmp/spec/compat/PASSING.html
What's the motivation for this? Well, two months ago, I thought that
toysh and OSH (part of https://oils.pub/ ) were the only projects
aiming for bash compatibility.
But then I learned there are TWO shells in Rust aiming at bash
compatibility, both started in 2022 - in this thread
https://news.ycombinator.com/item?id=43908368
So I thought you may be interested in this.
A few years ago I transcribed some tests from toybox, so thanks for that:
https://pages.oils.pub/spec-compat/2025-06-26/renamed-tmp/spec/compat/toysh.html
https://pages.oils.pub/spec-compat/2025-06-26/renamed-tmp/spec/compat/toysh-posix.html
---
I've contacted the authors of the other shells as well -- there seems
to be a lot of duplicated effort!
The author of brush has expressed interest in using these spec tests,
so I am thinking of turning into something more "cross project"
I would even call it "Bashix" -- a superset of POSIX, that multiple
shells could agree on -- so that users have a stable and well-defined
language to write.
I've noticed for a long time that there is a LOT of behavior that
multiple shells agree on, e.g. assignment builtins, other builtins,
and arrays, that is not in POSIX.
I'm not sure how much time / motivation various authors have, but it
would probably be useful to coordinate. e.g. I notice many questions
about alias on the blog.
OSH has mostly figured those things out, although now that I look, it
doesn't quite match bash, although it is tied for the #2 in terms of
tests passing:
https://pages.oils.pub/spec-compat/2025-06-26/renamed-tmp/spec/compat/alias.html
(I don't think bash is always right, but often it is.)
Andy
More information about the Toybox
mailing list