Why Sponsor Oils? | blog | oilshell.org
I'm now using OSH as my interactive shell! Three recent milestones enabled this:
git-prompt.shand Python's virtualenv.
!$expands to the last word in the last command.
This was a long slog through many features and bugs. There's still more to do, but I'm confident that this "dogfooding" process will make the shell usable by others. It immediately revealed several issues, many of which I've already addressed.
This is the biggest milestone since last January, when I wrote that OSH could run large shell scripts that build Linux distros.
This work will take more than one post to explain. Here's an outline:
(1) The Interactive Shell Needs a Principled Parser
Poking at bash's interactive features revealed several bugs that have the same underlying cause. In this post, I'll
(2) Interactive Shell Screencasts
I'll show OSH running the programs above, and a sketch for a better interactive UI.
(3) Release of OSH 0.6.pre14
As part of the dogfooding process, I used OSH to release itself. Recall that each /release/$VERSION/ page — with its many tests, metrics, and benchmarks — involves thousands of lines of shell. In particular, devtools/release.sh invokes many other shell scripts.
0.6.pre13 is linked below, but the dogfooding process has already
produced more changes, which will go in
Caveat: the biggest open problem is that OSH is still too slow . Although this doesn't matter for many batch programs, it does matter for interactive scripts.
The code in bash-completion consists largely of messy and expensive string
processing, and it's already too slow under bash. But it can be more than
an order of magnitude slower under OSH — i.e. hitting
TAB may take
hundreds of milliseconds rather than tens.
I have some ideas to fix this, but they aren't guaranteed to succeed. OSH is still experimental in that respect.
I'll also discuss what I want to happen for the
0.6.0 release, which has been
brewing for a long time.
I want to get back to coding after those three posts, but I also want to write:
(4) Project Roadmap. This big milestone, as well as feedback from the BayLISA talk, clarified what I should work on next. I'm really motivated to work on the interpreter performance problem.
(5) Blog Roadmap. There are even more things to publish, like:
In the meantime, please try OSH 0.6.pre13:
I'm looking for experienced shell users to try OSH on real shell scripts — both interactive and batch — and report bugs!
This is important because changes to the OSH language will be more painful later. OSH can now run many real programs, so its architecture is becoming stable.
To build and run it, follow the instructions in INSTALL.txt.
Feel free to ask me questions in the comments. Or join oilshell.zulipchat.com and ask questions!
Some readers may wonder why it took nearly 3 years to start using OSH myself every day.
This lobste.rs comment gives some color on that. Key points:
This Hacker News comment explains why I took the long route to creating a new shell, with an analogy to C and C++. Replacing bash is a different task than creating a new shell.