Hacker News new | ask | show | jobs
by Crestwave 1042 days ago
> does NetBSD sh or FreeBSD sh have them.

Yes and yes. My FreeBSD machine has not even been updated in 5 years, if that helps.

> What's the point of "pure sh" if it's restricted to specific versions of shells.

The aforementioned features have been implemented for a very long time. The issues with old versions of dash I mentioned were straight-up crashes for very simple things, not some fancy new-fangled feature that was yet to be implemented. Even then, the bible specifically listed workarounds for them.

dylanaraps has quite a prolific collection of shell programs, and they run on a variety of operating systems. Most notably, pfetch[1] runs on Linux, Android, NetBSD, FreeBSD, OpenBSD, Minix, Haiku, macOS, Solaris and IRIX. I assure you that he is fully aware of the importance of compatibility.

His pure Bash bible even has very thorough warnings for Bash versions required, since macOS uses Bash 3.2 (released in 2006).

[1] https://github.com/dylanaraps/pfetch