Hacker News new | ask | show | jobs
by chubot 2619 days ago
Roughly speaking, it's a "sane" subset. But it's also a large subset -- it aims to run all bash programs either unchanged or with trivial patches. So far that's been working out better than I expected.

Occasionally a shell script will rely on something really odd, but that hasn't happened too often. For example, arithmetic in ksh/bash has some really horrible corner cases, but nobody relies on those. They mostly just increment counters and so forth.

OSH also has some features that bash doesn't have, so it's not really a subset.

Eventually there is supposed to be a legacy-free shell language called "Oil", but I've had my hands full with OSH, so I don't have much to say about that. But I think replacing bash is more important than creating an incompatible shell language that probably won't get used!

2 comments

Do you know if there is a comprehensive list of known differences somewhere?
There are some difference listed here:

https://github.com/oilshell/oil/blob/master/doc/osh-manual.m...

Those are the ones that I thought people might hit. There are surely some other differences, which may or may not matter in practice.

This is why I'm looking for people to test OSH now. It's easier to change it sooner than later. If you want to use your favorite shell script unmodified with OSH, please test it :) Or let me know if you have difficulties testing it.

Do you know if there is a comprdhensive list of known differences somewhere?