2 ms·
Evolving bash, removing footguns, and providing a path forward is exactly what https://www.oilshell.org https://www.oilshell.org is about :) It's run thousands
by chubot 4y ago
Evolving bash, removing footguns, and providing a path forward is exactly what https://www.oilshell.org https://www.oilshell.org is about :)
It's run thousands of lines of unmodified shell AND bash scripts for years, and provides an upgrade path to a new language.
The new language is described here, and you can try it: https://www.oilshell.org/release/latest/doc/oil-language-tour.html https://www.oilshell.org/release/latest/doc/oil-language-tou...
I've gotten some great feedback on it, but it's not stable yet. You can still influence the direction of the language (join us on Zulip)
Latest release gives the status of the project: https://www.oilshell.org/blog/2023/03/release-0.14.2.html https://www.oilshell.org/blog/2023/03/release-0.14.2.html
As an anecdote, one thing that was extremely difficult was fixing all the footguns around set -e / errexit in bash.
In shell and bash, "you're damned if you do set -e and damned if yuo don't"
However I believe we have done it: https://www.oilshell.org/release/0.14.2/doc/error-handling.html https://www.oilshell.org/release/0.14.2/doc/error-handling.h...
We simply provide options to make sure that every exit code is checked. That's really all. But shells do NOT do this. In fact the standard specifies that shells shouldn't, which has left people mystified for decades.
I've gotten good feedback about error handling and the rest of the changes. Again, you can try it right now if you want to verify that the footguns are indeed fixed.
- urxvtcd 4y ago> As an anecdote, one thing that was extremely difficult was fixing all the footguns around set -e / errexit in bash. Shameless plug: I've recently written a blog post about how set -e suddenly ceases to work when using function calls in flow control (what you refer to as "disabled errexit quirk"): https://snails.dev/posts/set-e.html https://snails.dev/posts/set-e.html Your comment made me interested in Oil, thanks!